class

Mimer::ResultSet

Inherits DB::ResultSet < DB::Disposable < Reference < Object

Constructors

new(statement : Statement, stmt : Pointer(LibMimer::Statement), column_count : Int32)
Source

Instance methods

column_count

Returns the number of columns in the result

Source
column_name(index : Int32) : String

Returns the name of the column in index 0-based position.

Source
move_next

Move the next row in the result. Return false if no more rows are available. See #each

Source
next_column_index

Returns the column index that corresponds to the next #read.

If the last column of the current row has been read, it must return #column_count.

Source
read(type : Int32.class) : Int32
Source
read(type : Int32 | ::Nil.class) : Int32 | Nil
Source
read(type : Int64.class) : Int64
Source
read(type : Int64 | ::Nil.class) : Int64 | Nil
Source
read(type : Float32.class) : Float32
Source
read(type : Float32 | ::Nil.class) : Float32 | Nil
Source
read(type : Float64.class) : Float64
Source
read(type : Float64 | ::Nil.class) : Float64 | Nil
Source
read(type : Bool.class) : Bool
Source
read(type : Bool | ::Nil.class) : Bool | Nil
Source
read(type : String.class) : String
Source
read(type : String | ::Nil.class) : String | Nil
Source
read(type : Bytes.class) : Bytes
Source
read(type : Bytes | ::Nil.class) : Bytes | Nil
Source
read(type : Time.class) : Time
Source
read(type : Time | ::Nil.class) : Time | Nil
Source
read

Returns the value at the current column as the most natural Crystal type, advancing the column index. NULL columns return nil.

Source