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 explain;
38pub mod expr;
39pub mod fts_query;
40pub mod ir;
41pub mod notice;
42pub mod params;
43pub mod parser;
44pub mod plan;
45pub mod plpgsql;
46pub mod registry;
47pub mod render;
48pub mod result;
49pub mod routines;
50pub mod schema;
51pub mod semantics;
52mod sql_batch_error;
53pub mod type_resolution;
54pub mod xml;
55
56pub use ast::{ColumnType, Statement};
57pub use async_sql_engine::AsyncSQLEngine;
58pub use compiler::{
59    compile, parse_regobject_name, parse_regprocedure_name, parse_regtype_name, parse_statements,
60    plan_only_for_test, resolve_deferred_create_foreign_table, resolve_deferred_create_table,
61    ParsedRegprocedureName, ParsedRegtypeName, ParsedStatement,
62};
63pub use error::SQLError;
64pub use fts_query::{parse_query_string as parse_fts_query_string, tokenize as fts_tokenize};
65pub use fts_query::{FTSNode, FTSParser, FTSToken, FTSTokenType};
66pub use notice::{NoticeLevel, SQLNotice};
67pub use params::SQLParam;
68pub use result::{ResultRow, SQLResult, SQLResultKind};
69pub use sql_batch_error::SQLBatchError;
70
71pub use ir::{
72    scalar_call_argument, scalar_call_arguments, ScalarExpr, ScalarFrameBound, ScalarOrder,
73    ScalarWindowFrame, ScalarWindowSpec, SubqueryId,
74};
75pub use schema::{ColumnIdentity, RowSchema};
76
77pub use type_resolution::*;
78pub use uqa_core::RelationIdentity;
79
80pub mod assignment;
81
82pub mod maintenance;
83
84pub mod retrieval;
85
86pub mod prepared;