llkv_plan/
lib.rs

1//! Planner data structures shared between SQL parsing and execution.
2//!
3//! The crate exposes:
4//! - [`plan_graph`] for the serialized DAG representation exchanged with tooling.
5//! - [`plans`] for high-level logical plan structures emitted by the SQL layer.
6//! - [`validation`] helpers that enforce naming and schema invariants while plans
7//!   are being assembled.
8//! - [`conversion`] utilities for converting SQL AST nodes to Plan types.
9//! - [`traversal`] generic iterative traversal utilities for deeply nested ASTs.
10//!
11//! Modules are re-exported so downstream crates can `use llkv_plan::*` when they
12//! only need a subset of the functionality.
13#![forbid(unsafe_code)]
14
15pub mod canonical;
16pub mod conversion;
17pub mod plan_graph;
18pub mod plans;
19pub mod subquery_correlation;
20pub mod traversal;
21pub mod validation;
22
23pub use canonical::{CanonicalRow, CanonicalScalar};
24pub use conversion::{
25    RangeSelectRows, extract_rows_from_range, plan_value_from_sql_expr, plan_value_from_sql_value,
26};
27pub use plan_graph::*;
28pub use plans::*;
29pub use subquery_correlation::{
30    SUBQUERY_CORRELATED_PLACEHOLDER_PREFIX, SubqueryCorrelatedColumnTracker,
31    SubqueryCorrelatedTracker, subquery_correlated_placeholder,
32};
33pub use traversal::{TransformFrame, Traversable, traverse_postorder};