postgleam/stream

Values

pub fn fetch_chunk(
  state: connection.ConnectionState,
  prepared: connection.PreparedStatement,
  registry: dict.Dict(Int, codec.Codec),
  max_rows: Int,
  timeout: Int,
) -> Result(
  #(connection.StreamChunk, connection.ConnectionState),
  error.Error,
)

Fetch a single chunk of rows from an already-bound portal.

pub fn stream_query(
  state: connection.ConnectionState,
  prepared: connection.PreparedStatement,
  params: List(option.Option(value.Value)),
  registry: dict.Dict(Int, codec.Codec),
  max_rows: Int,
  timeout: Int,
) -> Result(
  #(connection.ExtendedQueryResult, connection.ConnectionState),
  error.Error,
)

Fetch all rows from a query in chunks of max_rows. Returns the complete result after all chunks have been collected.

Search Document