class CQL::Postgres::RowStream

Overview

The rows of one statement, read from the server fetch_size at a time through a portal, so a large result is never held in memory whole. It is an Iterator, valid only inside the block of Session#stream (the session is locked and the portal open until the block ends).

Included Modules

Defined in:

postgres/row_stream.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(session : Session, columns : Array(Column), fetch_size : Int32) #

[View source]

Instance Method Detail

def aborted? : Bool #

The statement failed or the session was dropped; nothing is left to clean up.


[View source]
def columns : Array(Column) #

[View source]
def finished? : Bool #

The server sent every row.


[View source]
def next #
Description copied from module Iterator(Array(Bool | CQL::Postgres::Types::Custom | CQL::Postgres::Types::DecimalText | Float32 | Float64 | Int16 | Int32 | Int64 | JSON::Any | Slice(UInt8) | String | Time | Time::Span | UInt32 | UUID | Nil))

Returns the next element in this iterator, or Iterator::Stop::INSTANCE if there are no more elements.


[View source]
def peak_buffered : Int32 #

The most rows ever held at once; never more than the fetch size.


[View source]
def rows_affected : Int64 #

[View source]
def rows_read : Int64 #

[View source]
def tag : String #

[View source]