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):close

TBD

meth (Arg₁: connection):connected

TBD

meth (Arg₁: connection):db

TBD

meth (Arg₁: connection):host

TBD

meth (Arg₁: connection):hostaddr

TBD

meth (Arg₁: connection):options

TBD

meth (Arg₁: connection):pass

TBD

meth (Arg₁: connection):port

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 on Connection, with arguments Argᵢ if supplied. Returns a list of tuples (for SELECT, etc) or nil for commands without results.

meth (Arg₁: connection):reconnect(Arg₂: number)

TBD

meth (Arg₁: connection):user

TBD

type statement < function

A prepared statement. Calling a statement executes the prepared statement on the associated connection, with the provided arguments (if any).