Postgres module

query_dynamic

procedure · 1 overloadsince 0.27.0Source

Runs one statement with parameters $1, $2, ... taken from args, and returns its rows in text format. Arguments may be integers, floats, bools, strings, [] u8 (bytea), Uuid, Timestamp, Local_Timestamp, Date, Time, Interval, Numeric, Nullable of any of those, and one-dimensional arrays of them.

query_dynamic :: (
    c: *Connection,
    sql: string,
    args: ..Any
) -> (Result, Pg_Error)

Runs one statement with parameters $1, $2, ... taken from args, and returns its rows in text format. Arguments may be integers, floats, bools, strings, [] u8 (bytea), Uuid, Timestamp, Local_Timestamp, Date, Time, Interval, Numeric, Nullable of any of those, and one-dimensional arrays of them.

Parameters

c: *Connection
the connection.
sql: string
one statement, with $1, $2, ... for the parameters.
args: ..Any
the parameter values, $1 first.

Returns

See also