PGWire.Protocol behaviour (pg_wire v0.0.2)

Link to this section Summary

Link to this section Functions

Link to this function

complete(statement, affected)

Specs

complete(PGWire.Query.t() | String.t(), integer()) :: iolist()
Link to this function

encode_data(rows)

Specs

encode_data([map()] | map()) :: iolist()
Link to this function

encode_descriptor(row)

Specs

encode_descriptor([map()] | map()) :: iolist()

Specs

ready() :: iolist()

Link to this section Callbacks

Link to this callback

handle_authentication(auth, state)

Specs

handle_authentication(auth :: any(), state :: term()) ::
  {:ok, [message], new_state}
  | {:error, reason, new_state}
  | {status, new_state}
  | {:disconnect, reason, new_state}
when new_state: term(), reason: term(), message: term(), status: term()
Link to this callback

handle_query(query, state)

Specs

handle_query(query :: any(), state :: term()) ::
  {:ok, [message], new_state}
  | {status, new_state}
  | {:disconnect, reason, new_state}
when new_state: term(), reason: term(), message: term(), status: term()

Specs

init(args :: term()) :: {:ok, state} | :ignore | {:stop, reason :: any()}
when state: any()