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



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

def fields
  warn(<<-eowarn) if $VERBOSE
#{caller[0]} is calling `#{self.class}#fields` which is deprecated and 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



42
43
44
45
46
47
# File 'lib/sqlite3/resultset.rb', line 42

def types
  warn(<<-eowarn) if $VERBOSE
#{caller[0]} is calling `#{self.class}#types` which is deprecated and 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



56
57
58
59
# File 'lib/sqlite3/resultset.rb', line 56

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