Behaviours: epgsql_command.
Execute multiple extended queries in a single network round-trip
There are 2 kinds of interface:statement()
statement()
> {Bind < BindComplete > Execute < DataRow* < CommandComplete}* > Sync < ReadyForQuery
arguments() = {epgsql:statement(), [[epgsql:bind_param()]]} | [{epgsql:statement(), [epgsql:bind_param()]}]
response() = [{ok, Count::non_neg_integer(), Rows::[tuple()]} | {ok, Count::non_neg_integer()} | {ok, Rows::[tuple()]} | {error, epgsql:query_error()}]
state() = #batch{batch = [[epgsql:bind_param()]] | [{#statement{name = string(), columns = [#column{name = binary(), type = epgsql:epgsql_type(), oid = non_neg_integer(), size = -1 | pos_integer(), modifier = -1 | pos_integer(), format = integer(), table_oid = non_neg_integer(), table_attr_number = pos_integer()}], types = [epgsql:epgsql_type()], parameter_info = [epgsql_oid_db:oid_entry()]}, [epgsql:bind_param()]}], statement = #statement{name = string(), columns = [#column{name = binary(), type = epgsql:epgsql_type(), oid = non_neg_integer(), size = -1 | pos_integer(), modifier = -1 | pos_integer(), format = integer(), table_oid = non_neg_integer(), table_attr_number = pos_integer()}], types = [epgsql:epgsql_type()], parameter_info = [epgsql_oid_db:oid_entry()]} | undefined, decoder = epgsql_wire:row_decoder() | undefined}
execute/2 | |
handle_message/4 | |
init/1 |
execute(Sock, Batch) -> any()
handle_message(X1, Bin, Sock, State) -> any()
init(Batch::arguments()) -> state()
Generated by EDoc