vibesql-ast
Abstract Syntax Tree (AST) definitions for SQL:1999.
Overview
This crate defines the structure of SQL statements and expressions as parsed from SQL text. The AST provides a tree representation that preserves the semantic structure of SQL queries.
Features
- DDL Statements: CREATE, ALTER, DROP for tables, views, indexes, sequences, etc.
- DML Statements: INSERT, UPDATE, DELETE with full expression support
- Query Expressions: SELECT with joins, subqueries, CTEs, window functions
- Expression Trees: Binary/unary operators, functions, CASE expressions
- Access Control: GRANT and REVOKE statements
- Transaction Control: BEGIN, COMMIT, ROLLBACK, SAVEPOINT
- Introspection: SHOW and DESCRIBE statements
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Basic example:
use ;
// AST nodes represent SQL structures
let expr = BinaryOp ;
Documentation
License
This project is licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.