galchemy/orm/loading
Types
pub type AppliedOptions {
AppliedOptions(
query: expression.SelectQuery,
select_in: List(SelectInPlan),
)
}
Constructors
-
AppliedOptions( query: expression.SelectQuery, select_in: List(SelectInPlan), )
pub type LoaderOption {
JoinedLoad(
relation_name: String,
related_model: query.ModelRef,
)
SelectInLoad(
relation_name: String,
related_model: query.ModelRef,
)
}
Constructors
-
JoinedLoad(relation_name: String, related_model: query.ModelRef) -
SelectInLoad( relation_name: String, related_model: query.ModelRef, )
pub type LoadingError {
QueryError(query.QueryError)
MissingParentField(
table: relation.TableRef,
relation_name: String,
column: String,
)
}
Constructors
-
QueryError(query.QueryError) -
MissingParentField( table: relation.TableRef, relation_name: String, column: String, )
pub type SelectInPlan {
SelectInPlan(
parent: query.ModelRef,
relation: relation.Relation,
related_model: query.ModelRef,
)
}
Constructors
-
SelectInPlan( parent: query.ModelRef, relation: relation.Relation, related_model: query.ModelRef, )
Values
pub fn apply(
query: expression.SelectQuery,
parent_model: query.ModelRef,
options: List(LoaderOption),
) -> Result(AppliedOptions, LoadingError)
pub fn joinedload(
relation_name: String,
related_model: query.ModelRef,
) -> LoaderOption
pub fn query(applied: AppliedOptions) -> expression.SelectQuery
pub fn selectin_queries(
applied: AppliedOptions,
parents: List(entity.Entity),
) -> Result(List(query.Query), LoadingError)
pub fn selectinload(
relation_name: String,
related_model: query.ModelRef,
) -> LoaderOption