class

Rayo::PG::Conn

Inherits Reference < Object

Owns no socket. The driver sends output, acknowledges bytes via on_sent, and feeds arbitrary receive fragments to on_data. One driver per connection.

Constructors

new(url : String, max_depth : Int32 = 16384)
Source

Instance methods

alive?
Source
available?
Source
close
Source
dispatching?
Source
host
Source
lost

Transport failures complete every outstanding callback in FIFO order.

Source
max_depth
Source
on_data(p : Pointer(UInt8), n : Int32) : Nil
Source
on_sent(res : Int32) : Nil
Source
output

Swapping keeps the submitted pointer stable while more queries are queued. Call again after partial sends and after on_data produces auth responses.

Source
pending
Source
port
Source
query(stmt : Statement, *args, state : Int64 = 0_i64, &callback : Result, Int64 -> Nil) : Nil

First use emits Parse/Describe. Later uses only Bind/Execute/Sync. State is a request ID or a pointer's address; use a non-capturing callback.

Source
query(stmt : Statement, *args, state : Pointer(T), &callback : Result, Pointer(Void) -> Nil) : Nil forall T
Source
ready?
Source