z_db_worker behaviour (zotonic_core v1.0.0-rc.12)
Link to this section Summary
Link to this section Callbacks
Link to this callback
equery/4
-callback equery(Worker, Sql, Parameters, Timeout) -> epgsql:reply(epgsql:equery_row()) when Worker :: pid(), Sql :: string(), Parameters :: [epgsql:bind_param()], Timeout :: non_neg_integer().
Link to this callback
squery/3
-callback squery(Worker, Sql, Timeout) -> epgsql:reply(epgsql:squery_row()) when Worker :: pid(), Sql :: string(), Timeout :: non_neg_integer().
Link to this callback
test_connection/1
-callback test_connection(WorkerArgs) -> ok | {error, Reason} when WorkerArgs :: proplists:proplist(), Reason :: term().