Expand description
nodedb-sql: SQL parser, planner, and optimizer for NodeDB.
Parses SQL via sqlparser-rs, resolves against a catalog, and produces
SqlPlan — an intermediate representation that both Origin (server)
and Lite (embedded) map to their own execution model.
SQL → parse → resolve → plan → optimize → SqlPlanRe-exports§
pub use temporal::TemporalScope;pub use temporal::ValidTime;pub use catalog::SqlCatalog;pub use catalog::SqlCatalogError;pub use error::Result;pub use error::SqlError;pub use params::ParamValue;pub use types::*;
Modules§
- aggregate_
walk - AST traversal for aggregate detection and extraction.
- catalog
SqlCatalogtrait + descriptor-resolution error type.- coerce
- Postgres-semantic value coercion for planner use-sites.
- ddl_ast
- Typed AST for NodeDB-specific DDL statements.
- dsl_
bind - Lexer-aware parameter binding for DSL statements.
- engine_
rules - error
- Error types for the nodedb-sql crate.
- fts_
types - FTS query type used by
SqlPlan::TextSearch. - functions
- optimizer
- params
- AST-level parameter binding for prepared statements.
- parser
- planner
- reserved
- NodeDB reserved identifier list.
- resolver
- temporal
- Bitemporal scope types threaded through the SQL planner.
- types
- SqlPlan intermediate representation types.
- types_
array - Engine-agnostic AST shapes for array DDL/DML carried on
SqlPlan. - types_
expr - SQL value / expression / operator types.
Functions§
- parse_
expr_ string - Parse a standalone SQL expression string into an
SqlExpr. - plan_
sql - Plan one or more SQL statements against the given catalog.
- plan_
sql_ with_ params - Plan SQL with bound parameters (prepared statement execution).