Class: SQLite3::ResultSet::HashWithTypesAndFields

Inherits:
Hash
  • Object
show all
Defined in:
lib/sqlite3/resultset.rb

Overview

The class of which we return an object in case we want a Hash as result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fieldsObject



37
38
39
# File 'lib/sqlite3/resultset.rb', line 37

def fields
  @fields
end

#typesObject



33
34
35
# File 'lib/sqlite3/resultset.rb', line 33

def types
  @types
end

Instance Method Details

#[](key) ⇒ Object



41
42
43
44
# File 'lib/sqlite3/resultset.rb', line 41

def [] key
  key = fields[key] if key.is_a? Numeric
  super key
end