Crate sql_parser[][src]

Expand description

SQL parser.

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

use 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);

Modules

SQL Abstract Syntax Tree (AST) types

SQL lexer.

SQL Parser

Macros