#[cfg(test)]
mod tests;
use crate::db::{
QueryError,
query::{
construction::ConstructionBudget,
plan::{OrderSpec, expr::Expr},
preparation::PreparationWork,
},
};
impl PreparationWork<'_> {
pub(in crate::db) fn copy_order_spec(
&self,
order: &OrderSpec,
) -> Result<OrderSpec, QueryError> {
(self as &dyn ConstructionBudget)
.copy_order_spec(order)
.map_err(QueryError::execute)
}
pub(in crate::db) fn copy_expr(&self, expr: &Expr) -> Result<Expr, QueryError> {
(self as &dyn ConstructionBudget)
.copy_expr(expr)
.map_err(QueryError::execute)
}
}