mod cache;
#[cfg(feature = "diagnostics")]
mod diagnostics;
#[cfg(feature = "sql")]
mod dynamic;
#[cfg(feature = "sql")]
mod grouped;
use crate::db::{QueryError, executor::ExecutorPlanError};
pub(in crate::db) use cache::QueryPlanCacheAttribution;
#[cfg(feature = "diagnostics")]
pub(in crate::db) use cache::QueryPlanCompilePhaseAttribution;
#[cfg(any(test, feature = "sql-explain"))]
pub(in crate::db::session) use cache::query_plan_cache_reuse_event;
#[cfg(feature = "diagnostics")]
pub use diagnostics::{
DirectDataRowAttribution, GroupedCountAttribution, GroupedExecutionAttribution,
KernelRowAttribution, ScalarAggregateAttribution,
};
pub(in crate::db::session) fn query_error_from_executor_plan_error(
err: ExecutorPlanError,
) -> QueryError {
match err {
ExecutorPlanError::Cursor(err) => QueryError::from_cursor_plan_error(*err),
}
}