Skip to main content

vlorql_core/
lib.rs

1//! Core data types, validators, and SQL compilation for VlorQl.
2//!
3//! This crate implements the *plan-then-execute* boundary described
4//! in the VlorQl design notes:
5//!
6//! * The LLM only ever emits a [`QueryPlan`](schema::QueryPlan) (a typed JSON object).
7//! * [`validate::ValidationPipeline`] runs schema, policy, operand,
8//!   and dialect validation on the plan and aggregates every
9//!   violation into a single [`errors::ValidationErrors`].
10//! * [`compile::QueryBuilder`] turns a validated plan into
11//!   parameterized SQL, delegating dialect-specific syntax to a
12//!   [`compile::SqlCompiler`] implementation.
13//!
14//! The crate has no I/O dependencies and can be used standalone
15//! (e.g. to construct or inspect plans in unit tests) or as the
16//! foundation of the higher-level [`vlorql`](https://docs.rs/vlorql)
17//! facade.
18
19#![deny(missing_docs)]
20
21pub mod cache;
22pub mod compile;
23pub mod errors;
24pub mod observability;
25pub mod optimizer;
26pub mod policy;
27pub mod prompt;
28pub(crate) mod query;
29pub mod schema;
30pub mod statistics;
31pub mod validate;