Loads a to-one relation for several rows; see Loaded_One.
- db: a connection or pool.
- parents: the rows to load for.
- relation: the name of the
@pg_belongs_torelation. - call: the code of the call, which lets the query text be checked while compiling. Leave the default.
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_torelation. - $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))