Postgres module

load_one

procedure · 1 overloadsince 0.27.0Source

Loads a to-one relation for several rows; see Loaded_One.

load_one :: (
    db: $D,
    parents: [] $T,
    $relation: string,
    $call := #caller_code
) -> (Loaded_One(#insert,scope(call) #run orm_relation_target(T, relation, .BELONGS_TO)), Pg_Error)

Loads a to-one relation for several rows; see Loaded_One.

Parameters

db: $D
a connection or pool.
parents: [] $T
the rows to load for.
$relation: string
the name of the @pg_belongs_to relation.
$call := #caller_code
the code of the call, which lets the query text be checked while compiling. Leave the default.

Returns

Loaded_One(#insert,scope(call) #run orm_relation_target(T, relation, .BELONGS_TO))

See also