Postgres module

update

procedure · 1 overloadsince 0.27.0Source

Sets fields of the rows that pass where: set = #code it.score = score + 1 (or a block of such assignments). Returns the number of rows changed.

update :: (
    db: $D,
    $T: Type,
    $set: Code,
    $where: Code,
    $call := #caller_code
) -> (s64, Pg_Error)

Sets fields of the rows that pass where: set = #code it.score = score + 1 (or a block of such assignments). Returns the number of rows changed.

Parameters

db: $D
a connection or pool.
$T: Type
the table struct.
$set: Code
the assignments to make.
$where: Code
the filter.
$call := #caller_code
the code of the call, which lets the query text be checked while compiling. Leave the default.

Returns

s64

See also