Skip to main content

radixdb_sql/
lib.rs

1// Copyright 2026 RadixDB Contributors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Canonical SQL syntax contracts and parser for RadixDB.
16//!
17//! This private implementation crate owns tokens, lexer, AST, diagnostics and
18//! parsing. It is not an application dependency and has no storage or query
19//! execution policy.
20
21pub mod ast;
22pub mod error;
23pub mod lexer;
24pub mod parser;
25pub mod precedence;
26pub mod token;
27
28mod expressions;
29mod parse;
30mod statements;
31
32pub use ast::*;
33pub use error::{ParseError, ParseErrors};
34pub use lexer::Lexer;
35pub use parse::parse_sql;
36pub use parser::Parser;
37pub use precedence::Precedence;
38pub use token::{
39    is_keyword, is_operator, is_operator_char, is_punctuator, punctuator_str, Position, Token,
40    TokenType, KEYWORDS, OPERATORS, PUNCTUATORS,
41};