Postgres module

pipeline_next_result

procedure · 1 overloadsince 0.27.0Source

Reads the result of the oldest queued statement or sync point, sending what is still unsent first. Blocks the fiber until the answer is in, within any Io.with_deadline: after a deadline the pipeline keeps what it had read, and the call can be repeated. The result's kind is NONE when nothing is queued. The returned error is for failures of the connection; the server's errors come as .ERROR results. Free the result with free_pipeline_result.

pipeline_next_result :: (p: *Pipeline) -> (Pipeline_Result, Pg_Error)

Reads the result of the oldest queued statement or sync point, sending what is still unsent first. Blocks the fiber until the answer is in, within any Io.with_deadline: after a deadline the pipeline keeps what it had read, and the call can be repeated. The result's kind is NONE when nothing is queued. The returned error is for failures of the connection; the server's errors come as .ERROR results. Free the result with free_pipeline_result.

Parameters

p: *Pipeline
the pipeline from pipeline_enter.

Returns

See also