Skip to main content

nodedb_sql/ddl_ast/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! Typed AST for NodeDB-specific DDL statements.
4//!
5//! Every DDL command the system supports is represented as a variant
6//! of [`NodedbStatement`]. The DDL router matches on this enum
7//! instead of string prefixes, so the compiler catches missing
8//! handlers when a new DDL is added.
9//!
10//! The parser ([`parse`]) converts raw SQL into a `NodedbStatement`
11//! using whitespace-split token matching — the same technique the
12//! old string-prefix router used, but producing a typed output.
13
14pub mod alter_ops;
15pub mod collection_type;
16pub mod graph_parse;
17pub mod graph_types;
18pub mod parse;
19pub mod statement;
20
21pub use alter_ops::{
22    AlterCollectionOp, AlterRoleOp, AlterUserOp, ConflictPolicyKind, ConstraintKindKeyword,
23};
24pub use collection_type::build_collection_type;
25pub use graph_parse::{FusionParams, parse_search_using_fusion};
26pub use graph_types::{GraphDirection, GraphProperties};
27pub use nodedb_types::QuotaSpec;
28pub use nodedb_types::{MirrorMode, MirrorStatus};
29pub use parse::parse;
30pub use statement::{
31    AlterDatabaseOperation, AlterTenantOperation, CloneAsOf, NodedbStatement,
32    OidcClaimMappingClause,
33};