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)
SourceInstance methods
alive?
Sourceavailable?
Sourceclose
Sourcedispatching?
Sourcehost
Sourcemax_depth
Sourceon_data(p : Pointer(UInt8), n : Int32) : Nil
Sourceon_sent(res : Int32) : Nil
Sourceoutput
Swapping keeps the submitted pointer stable while more queries are queued. Call again after partial sends and after on_data produces auth responses.
pending
Sourceport
Sourcequery(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.
query(stmt : Statement, *args, state : Pointer(T), &callback : Result, Pointer(Void) -> Nil) : Nil forall T
Sourceready?
Source