Expand description
SQL parser and compiler: PostgreSQL grammar via libpg_query, UQA
function registry, expression evaluator, FTS query mini-language.
Re-exports§
pub use ast::ColumnType;pub use ast::Statement;pub use compiler::compile;pub use compiler::plan_only_for_test;pub use error::SQLError;pub use fts_query::parse_query_string as parse_fts_query_string;pub use fts_query::tokenize as fts_tokenize;pub use fts_query::FTSNode;pub use fts_query::FTSParser;pub use fts_query::FTSToken;pub use fts_query::FTSTokenType;pub use params::SQLParam;pub use result::ResultRow;pub use result::SQLResult;
Modules§
- ast
- Internal SQL AST. Lifts the relevant subset of the
libpg_queryprotobuf tree into a Rust enum the compiler walks. Statements not yet supported parse cleanly but compile tocrate::SQLError::Unsupported. - compiler
- Lift a
PostgreSQLparse tree into the internalStatementAST. - error
- Error types surfaced by the SQL compiler and executor.
- expr
- Scalar expression evaluator: turns an
Exprinto aValueunder a row context (column -> value) and a parameter binding. - fts_
query - Full-text search query-string parser.
- params
- Bind parameters for
Engine::sql(query, params). - plpgsql
PL/pgSQLfunction bodies: typed AST, parser, and the variable binding rewriter.- registry
- Function registry: maps SQL function names called inside
WHERE/ projections to UQA-side semantics (text match, vector knn, hybrid fusion, …). - result
- Result rows returned by
Engine::sql.
Traits§
- AsyncSQL
Engine - Common asynchronous SQL interface implemented by embedded and HTTP engines.