Skip to main content

uqa_sql/
lib.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! 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.
8
9#![allow(
10    clippy::useless_format,
11    clippy::manual_let_else,
12    clippy::match_wildcard_for_single_variants,
13    clippy::items_after_statements,
14    clippy::needless_pass_by_value,
15    clippy::unnecessary_wraps,
16    clippy::match_same_arms,
17    clippy::unnested_or_patterns,
18    clippy::unnecessary_join,
19    clippy::unnecessary_map_or,
20    clippy::needless_return,
21    clippy::redundant_closure,
22    clippy::redundant_closure_for_method_calls,
23    clippy::map_unwrap_or,
24    clippy::manual_string_new,
25    clippy::option_if_let_else,
26    clippy::cast_lossless,
27    clippy::format_collect
28)]
29
30pub mod ast;
31mod async_sql_engine;
32pub mod binding;
33pub mod catalog;
34pub mod compiler;
35pub mod copy;
36pub mod error;
37pub mod expr;
38pub mod fts_query;
39pub mod ir;
40pub mod params;
41pub mod plan;
42pub mod plpgsql;
43pub mod registry;
44pub mod render;
45pub mod result;
46pub mod routines;
47pub mod schema;
48pub mod semantics;
49pub mod type_resolution;
50
51pub use ast::{ColumnType, Statement};
52pub use async_sql_engine::AsyncSQLEngine;
53pub use compiler::{
54    compile, parse_regobject_name, parse_regprocedure_name, parse_regtype_name, parse_statements,
55    plan_only_for_test, resolve_deferred_create_foreign_table, resolve_deferred_create_table,
56    ParsedRegprocedureName, ParsedRegtypeName, ParsedStatement,
57};
58pub use error::SQLError;
59pub use fts_query::{parse_query_string as parse_fts_query_string, tokenize as fts_tokenize};
60pub use fts_query::{FTSNode, FTSParser, FTSToken, FTSTokenType};
61pub use params::SQLParam;
62pub use result::{ResultRow, SQLResult, SQLResultKind};
63
64pub use ir::{
65    scalar_call_argument, scalar_call_arguments, ScalarExpr, ScalarFrameBound, ScalarOrder,
66    ScalarWindowFrame, ScalarWindowSpec, SubqueryId,
67};
68pub use schema::{ColumnIdentity, RowSchema};
69
70pub use type_resolution::*;
71pub use uqa_core::RelationIdentity;
72
73pub mod assignment;
74
75pub mod maintenance;
76
77pub mod retrieval;
78
79pub mod prepared;