The ResultSet object encapsulates the enumerability of a query’s output. It is a simple cursor over the data that the query returns.
Typical usage is:
require "sqlite3"
db = SQLite3::Database.new("foo.db")
stmt = db.prepare("select * from person")
result_set = stmt.execute
while result_set.next
p result_set.to_a
end
stmt.close
db.close
Returns the value of a column by index or name.
Closes this result set, closing the associated statement.
Returns true
if the associated statement is closed.
Returns the number of columns.
Returns the names of the columns, an Array(String)
.
Advances to the next row.
Return the current row's value as an Array(Value)
.
Returns the types of the columns, an Array(Type)
.
Advances to the next row. Returns true
if there's a next row,
false
otherwise. Must be called at least once to advance to the first
row.