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