Skip to main content

Crate uqa_sql

Crate uqa_sql 

Source
Expand description

SQL syntax, shared plan and scalar models, static schema and type binding, catalog definitions, routine signatures, value expressions, and the FTS query language. The parser uses the imported PostgreSQL grammar through libpg_query; analysis has no engine or physical execution dependency.

Re-exports§

pub use ast::ColumnType;
pub use ast::Statement;
pub use compiler::compile;
pub use compiler::parse_regobject_name;
pub use compiler::parse_regprocedure_name;
pub use compiler::parse_regtype_name;
pub use compiler::parse_statements;
pub use compiler::plan_only_for_test;
pub use compiler::resolve_deferred_create_foreign_table;
pub use compiler::resolve_deferred_create_table;
pub use compiler::ParsedRegprocedureName;
pub use compiler::ParsedRegtypeName;
pub use compiler::ParsedStatement;
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;
pub use result::SQLResultKind;
pub use ir::ScalarExpr;
pub use ir::ScalarFrameBound;
pub use ir::ScalarOrder;
pub use ir::ScalarWindowFrame;
pub use ir::ScalarWindowSpec;
pub use ir::SubqueryId;
pub use schema::ColumnIdentity;
pub use schema::RowSchema;
pub use type_resolution::*;

Modules§

assignment
SQL assignment conversion and catalog-defined domain constraints.
ast
Internal SQL AST. Lifts the relevant subset of the libpg_query protobuf tree into a Rust enum the compiler walks. Statements not yet supported parse cleanly but compile to crate::SQLError::Unsupported.
binding
Static relational row-type binding.
catalog
PostgreSQL 18 row types for the virtual system-catalog relations implemented by the engine.
compiler
Lift a PostgreSQL parse tree into the internal Statement AST.
copy
PostgreSQL COPY statement envelopes and stream codecs.
error
Error types surfaced by the SQL compiler and executor.
expr
Scalar expression evaluator: turns an Expr into a Value under a row context (column -> value) and a parameter binding.
fts_query
Full-text search query-string parser.
ir
Serializable scalar SQL IR shared by analysis, planning, and execution.
maintenance
Interpret VACUUM options and bind target relation metadata before storage maintenance.
params
Bind parameters for Engine::sql(query, params).
plan
Complete SQL-to-execution-plan lowering.
plpgsql
PL/pgSQL function bodies: typed AST, parser, and the variable binding rewriter.
prepared
Prepared definitions, result descriptors, and SQL EXECUTE argument contracts.
registry
Function registry: maps SQL function names called inside WHERE / projections to UQA-side semantics (text match, vector knn, hybrid fusion, …).
render
Stable SQL rendering for compiler-owned statement trees.
result
Result rows returned by Engine::sql.
retrieval
SQL retrieval argument binding and lowering to runtime-independent expressions.
routines
SQL routine definitions and static signature lookup contracts.
schema
SQL column identities, declared types, and logical slot layouts.
semantics
SQL semantics shared by static analysis and runtime adapters.
type_resolution
Static SQL type propagation and PostgreSQL-compatible common-type rules.

Structs§

RelationIdentity
Durable identity of a SQL relation.

Traits§

AsyncSQLEngine
Common asynchronous SQL interface implemented by embedded and HTTP engines.