class SQLite3::ResultSet
def next
For hashes, the column names are the keys of the hash, and the column
and the column types are accessible via the +types+ property.
For arrays, the column names are accessible via the +fields+ property,
been set to +true+, in which case the returned value will be a hash.
The returned value will be an array, unless Database#results_as_hash has
according to their types.
corresponding database, the values in the row will be translated
had, this will return +nil+. If type translation is active on the
Obtain the next row from the cursor. If there are no more rows to be
def next if @db.results_as_hash return next_hash end row = @stmt.step return nil if @stmt.done? row = @db.translate_from_db @stmt.types, row if row.respond_to?(:fields) # FIXME: this can only happen if the translator returns something # that responds to `fields`. Since we're removing the translator # in 2.0, we can remove this branch in 2.0. row = ArrayWithTypes.new(row) else # FIXME: the `fields` and `types` methods are deprecated on this # object for version 2.0, so we can safely remove this branch # as well. row = ArrayWithTypesAndFields.new(row) end row.fields = @stmt.columns row.types = @stmt.types row end