use crate::db::query::{builder::AggregateExpr, plan::GroupedPlanStrategyHint};
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub(in crate::db::executor) enum FastPathOrder {
PrimaryKey,
SecondaryPrefix,
PrimaryScan,
IndexRange,
Composite,
}
pub(in crate::db::executor) const LOAD_FAST_PATH_ORDER: [FastPathOrder; 3] = [
FastPathOrder::PrimaryKey,
FastPathOrder::SecondaryPrefix,
FastPathOrder::IndexRange,
];
pub(in crate::db::executor) const AGGREGATE_FAST_PATH_ORDER: [FastPathOrder; 5] = [
FastPathOrder::PrimaryKey,
FastPathOrder::SecondaryPrefix,
FastPathOrder::PrimaryScan,
FastPathOrder::IndexRange,
FastPathOrder::Composite,
];
pub(in crate::db::executor) const GROUPED_AGGREGATE_FAST_PATH_ORDER: [FastPathOrder; 0] = [];
pub(in crate::db::executor) const MUTATION_FAST_PATH_ORDER: [FastPathOrder; 0] = [];
pub(in crate::db::executor::route) enum RouteIntent {
Load,
Aggregate {
aggregate: AggregateExpr,
aggregate_force_materialized_due_to_predicate_uncertainty: bool,
},
AggregateGrouped {
grouped_plan_strategy_hint: GroupedPlanStrategyHint,
aggregate_force_materialized_due_to_predicate_uncertainty: bool,
},
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub(in crate::db::executor) enum RouteShapeKind {
LoadScalar,
AggregateCount,
AggregateNonCount,
AggregateGrouped,
MutationDelete,
}