Postgres module

orm_load_many_as

procedure · 1 overloadsince 0.27.0Source

load_many with the related struct given, for Pg.each, whose loop knows it already.

orm_load_many_as :: (
    db: $D,
    parents: [] $T,
    $relation: string,
    $Target: Type,
    $project_file: string
) -> (Loaded_Many(Target), Pg_Error)

load_many with the related struct given, for Pg.each, whose loop knows it already.

Parameters

db: $D
a connection or pool.
parents: [] $T
the rows to load for.
$relation: string
the name of the @pg_has_many relation.
$Target: Type
the related struct.
$project_file: string
the file the loop is in.

Returns

Loaded_Many(Target)

See also