Expand description
Arena-allocated SQL parser.
This module provides a parser that allocates AST nodes from a bump arena for improved performance. All allocations are contiguous in memory and freed in a single operation when the arena is dropped.
§Usage
For arena-allocated AST (fastest, but requires arena lifetime management):
use bumpalo::Bump;
use vibesql_parser::arena_parser::ArenaParser;
let arena = Bump::new();
let result = ArenaParser::parse_sql("SELECT * FROM users", &arena);For standard heap-allocated AST (convenient, with arena parsing benefits):
use vibesql_parser::arena_parser::parse_select_to_owned;
// Parse with arena internally, convert to owned SelectStmt
let stmt = parse_select_to_owned("SELECT * FROM users").unwrap();Structs§
- Arena
Parser - Arena-based SQL parser.
Functions§
- parse_
delete_ to_ owned - Parse DELETE SQL and return a heap-allocated (owned) DeleteStmt.
- parse_
expression_ to_ owned - Parse an expression and return a heap-allocated (owned) Expression.
- parse_
insert_ to_ owned - Parse INSERT SQL and return a heap-allocated (owned) InsertStmt.
- parse_
select_ to_ owned - Parse SQL and return a heap-allocated (owned) SelectStmt.
- parse_
update_ to_ owned - Parse UPDATE SQL and return a heap-allocated (owned) UpdateStmt.