db/postgres#
type connection
A connection to a Postgresql database.
meth connection(Settings: map): connection
Connects to a Postgresql database with the supplied settings.
meth connection(Name₁ is Value₁, ...): connection
Connects to a Postgresql database with the supplied settings.
meth (Arg₁: connection):connect
TBD
meth (Arg₁: connection):connected
TBD
meth (Connection: connection):prepare(SQL: string): statement
Creates a prepared statement on
Connection
.meth (Connection: connection):query(SQL: string, Arg: any, ...): list[tuple] | nil
Executes
SQL
onConnection
, with argumentsArgᵢ
if supplied. Returns a list of tuples (forSELECT
, etc) ornil
for commands without results.meth (Arg₁: connection):reconnect(Arg₂: number)
TBD
type statement < function
A prepared statement. Calling a statement executes the prepared statement on the associated connection, with the provided arguments (if any).