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



55
56
57
58
59
60
61
62
# File 'lib/sqlite3/resultset.rb', line 55

def fields
  warn("\#{caller[0]} is calling \#{self.class}#fields.  This method will be removed in\nsqlite3 version 2.0.0, please call the `columns` method on the SQLite3::ResultSet\nobject that created this object\n  eowarn\n  @fields\nend\n") if $VERBOSE

#typesObject



46
47
48
49
50
51
52
53
# File 'lib/sqlite3/resultset.rb', line 46

def types
  warn("\#{caller[0]} is calling \#{self.class}#types.  This method will be removed in\nsqlite3 version 2.0.0, please call the `types` method on the SQLite3::ResultSet\nobject that created this object\n  eowarn\n  @types\nend\n") if $VERBOSE

Instance Method Details

#[](key) ⇒ Object



64
65
66
67
# File 'lib/sqlite3/resultset.rb', line 64

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