This module defines the epgsql_command behaviour.
Required callback functions: init/1, execute/2, handle_message/4.
command() = module()
execute_return() = {ok, epgsql_sock:pg_sock(), state()} | {send, epgsql_wire:packet_type(), PktData::iodata(), epgsql_sock:pg_sock(), state()} | {send_multi, [{epgsql_wire:packet_type(), PktData::iodata()}], epgsql_sock:pg_sock(), state()} | {stop, Reason::any(), Response::any(), epgsql_sock:pg_sock()}
handle_message_return() = {noaction, epgsql_sock:pg_sock()} | {noaction, epgsql_sock:pg_sock(), state()} | {add_result, Data::any(), Notification::any(), epgsql_sock:pg_sock(), state()} | {add_row, tuple(), epgsql_sock:pg_sock(), state()} | {finish, Result::any(), Notification::any(), epgsql_sock:pg_sock()} | {stop, Reason::any(), Response::any(), epgsql_sock:pg_sock()} | {requeue, epgsql_sock:pg_sock(), state()} | {sync_required, Why::any()} | unknown
state() = any()
execute/3 | |
handle_message/5 | |
init/2 |
execute(Command::command(), PgSock::epgsql_sock:pg_sock(), CmdState::state()) -> execute_return()
handle_message(Command::command(), Type::byte(), Payload::binary() | epgsql:query_error(), PgSock::epgsql_sock:pg_sock(), State::state()) -> handle_message_return()
Generated by EDoc