Expand description

SQL parser.

This crate provides an SQL lexer and parser for Materialize’s dialect of SQL.

use mz_sql_parser::parser;

let sql = "SELECT a, b, 123, myfunc(b) \
           FROM table_1 \
           WHERE a > b AND b < 100 \
           ORDER BY a DESC, b";

let ast = parser::parse_statements(sql).unwrap();
println!("AST: {:?}", ast);


SQL Abstract Syntax Tree (AST) types

keywords 🔒
lexer 🔒

SQL lexer.

SQL Parser