load_many with the related struct given, for Pg.each, whose loop knows it already.
- db: a connection or pool.
- parents: the rows to load for.
- relation: the name of the
@pg_has_manyrelation. - Target: the related struct.
- project_file: the file the loop is in.
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_manyrelation. - $Target: Type
- the related struct.
- $project_file: string
- the file the loop is in.
Returns
- Loaded_Many(Target)