Skip to main content

Crate nodedb_sql

Crate nodedb_sql 

Source
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 → SqlPlan

Re-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
SqlCatalog trait + 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).