GenServer holding all connection state (including socket).
See https://www.postgresql.org/docs/current/static/protocol-flow.html Commands in PostgreSQL are pipelined: you don't need to wait for reply to be able to send next command. Commands are processed (and responses to them are generated) in FIFO order. eg, if you execute 2 SimpleQuery: #1 and #2, first you get all response packets for #1 and then all for #2: > SQuery #1 > SQuery #2 < RowDescription #1 < DataRow #1 < CommandComplete #1 < RowDescription #2 < DataRow #2 < CommandComplete #2
See epgsql_cmd_connect for network connection and authentication setupabstract datatype: pg_sock()
repl_state() = #repl{last_received_lsn = integer() | undefined, last_flushed_lsn = integer() | undefined, last_applied_lsn = integer() | undefined, feedback_required = boolean() | undefined, cbmodule = module() | undefined, cbstate = any() | undefined, receiver = pid() | undefined, align_lsn = boolean() | undefined}
tcp_socket() = port()
gen_tcp:socket() isn't exported prior to erl 18
transport() = {call, any()} | {cast, pid(), reference()} | {incremental, pid(), reference()}
async_command(C::epgsql:connection(), Transport::cast | incremental, Command::epgsql_command:command(), Args::any()) -> reference()
cancel(S) -> any()
close(C) -> any()
code_change(OldVsn, State, Extra) -> any()
get_cmd_status(C) -> any()
get_codec(State::pg_sock()) -> epgsql_binary:codec()
get_parameter(C, Name) -> any()
get_parameter_internal(Name::binary(), State::pg_sock()) -> binary() | undefined
get_replication_state(State::pg_sock()) -> repl_state()
get_results(State::pg_sock()) -> [any()]
get_rows(State::pg_sock()) -> [tuple()]
handle_call(X1, From, State) -> any()
handle_cast(X1, State) -> any()
handle_info(X1, State) -> any()
init(X1) -> any()
notify(State, Notice) -> any()
on_message(Msg, Bin, State) -> any()
on_replication(M, Err, State) -> any()
send(State::pg_sock(), Data::iodata()) -> ok | {error, any()}
send(State::pg_sock(), Type::byte(), Data::iodata()) -> ok | {error, any()}
send_multi(State::pg_sock(), List::[{byte(), iodata()}]) -> ok | {error, any()}
set_net_socket(Mod::gen_tcp | ssl, Socket::tcp_socket() | ssl:sslsocket(), State::pg_sock()) -> pg_sock()
set_notice_receiver(C, PidOrName) -> any()
start_link() -> any()
sync_command(C::epgsql:connection(), Command::epgsql_command:command(), Args::any()) -> any()
terminate(Reason, State) -> any()
Generated by EDoc