Class: SQLite3::ResultSet::HashWithTypesAndFields

Inherits:
Hash
  • Object
show all
Defined in:
lib/sqlite3-1.5.3-arm64-darwin/lib/sqlite3/resultset.rb,
lib/sqlite3-1.5.3-x86_64-darwin/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-1.5.3-arm64-darwin/lib/sqlite3/resultset.rb', line 55

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

#typesObject



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

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

Instance Method Details

#[](key) ⇒ Object



64
65
66
67
# File 'lib/sqlite3-1.5.3-arm64-darwin/lib/sqlite3/resultset.rb', line 64

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