Module epgsql_cmd_squery

Executes SQL query(es) using simple query protocol

Behaviours: epgsql_command.

Description

Executes SQL query(es) using simple query protocol

Squery can not have placeholders. Squery may contain many semicolon-separated queries
  > Query
  < (RowDescription?
  <  DataRow*
  <  CommandComplete)+
  < ReadyForQuery
  ---
  > Query when len(strip(Query)) == 0
  < EmptyQueryResponse
  < ReadyForQuery

Data Types

response()

response() = response_single() | [response_single()]

response_single()

response_single() = {ok, Count::non_neg_integer(), Cols::[epgsql:column()], Rows::[tuple()]} | {ok, Count::non_neg_integer()} | {ok, Cols::[epgsql:column()], Rows::[tuple()]} | {error, epgsql:query_error()}

Function Index

execute/2
handle_message/4
init/1

Function Details

execute/2

execute(Sock, Squery) -> any()

handle_message/4

handle_message(X1, Bin, Sock, State) -> any()

init/1

init(Sql) -> any()


Generated by EDoc