1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # PostgreSQL-compatible SQL on top of GuardianDB
//!
//! A PostgreSQL-dialect SQL engine for GuardianDB: parser (via `sqlparser`),
//! planner/executor, expression evaluator, DDL/DML, transactions, and catalog
//! introspection views — all on top of the storage-agnostic
//! [`crate::relational::RelationalStorage`] boundary.
//!
//! The engine's public surface is [`Database`] and [`Session`]. A `Session`
//! parses SQL, loads the tables a statement touches into memory, executes
//! synchronously, and commits the resulting mutations back to storage.
//!
//! The [`guardian_storage`] submodule bridges that storage boundary onto a
//! GuardianDB [`DocumentStore`](crate::traits::DocumentStore), so relational
//! tables replicate as ordinary GuardianDB documents. Use [`open_sql`] /
//! [`open_sql_with`] to obtain a [`Database`] backed by a live GuardianDB node.
/// GuardianDB-backed [`RelationalStorage`] bridge (the local-first, replicated
/// storage path). The engine itself is storage-agnostic; this is the glue onto
/// a GuardianDB [`DocumentStore`](crate::traits::DocumentStore).
pub use ;
pub use ;
pub use ;
pub use parse_sql;
pub use ;
pub use ;
// Re-exports from the relational core for convenience.
pub use crate;
// SQL compatibility note 9: preserves documented behavior for window functions, recursive CTE validation, SQLSTATE mapping, and aggregate correctness without changing runtime semantics.
// SQL compatibility note 9: preserves documented behavior for window functions, recursive CTE validation, SQLSTATE mapping, and aggregate correctness without changing runtime semantics.