Skip to main content

powdb_query/
lib.rs

1//! PowDB query engine — lexer, parser, planner, and executor for PowQL.
2//!
3//! The query pipeline: PowQL text → Lexer (tokens) → Parser (AST) → Planner (plan tree) → Executor (results).
4//! The planner is pure (no catalog access); plan lowering happens at execution time.
5//!
6//! # Public API boundary
7//!
8//! `canonicalize`, `plan`, `plan_cache`, and `token` are marked
9//! `#[doc(hidden)]`. They stay `pub` and code that imports them still compiles:
10//! the attribute hides a module from the generated documentation without
11//! restricting access to it. They are `pub` so that `powdb-server` can
12//! canonicalize a query for redaction, `powdb-cli` can inspect a token stream,
13//! and this crate's own integration tests can assert on plan shapes. None of
14//! that is an interface: plan shapes track the executor and tokens track the
15//! grammar, so both change without notice whenever those change.
16//!
17//! The supported entry points are the `powdb` facade crate and
18//! [`executor::Engine`]. See `docs/STABILITY.md` for what a version bump
19//! promises.
20
21pub mod ast;
22pub mod cancel;
23#[doc(hidden)]
24pub mod canonicalize;
25pub mod executor;
26pub mod lexer;
27pub mod parser;
28#[doc(hidden)]
29pub mod plan;
30#[doc(hidden)]
31pub mod plan_cache;
32pub mod planner;
33pub mod result;
34pub mod sql;
35#[doc(hidden)]
36pub mod token;