[][src]Crate sql_parser

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.to_string()).unwrap();
println!("AST: {:?}", ast);

Modules

ast

SQL Abstract Syntax Tree (AST) types

parser

SQL Parser