Postgres module

load_many

procedure · 1 overloadsince 0.27.0Source

Loads a has-many relation for several rows; see Loaded_Many.

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

Loads a has-many relation for several rows; see Loaded_Many.

Parameters

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

Returns

Loaded_Many(#insert,scope(call) #run orm_relation_target(T, relation, .HAS_MANY))

See also