Support basic CTEs (WITH)

Some unsupported features are noted as TODOs.
This commit is contained in:
Nickolay Ponomarev 2019-02-03 06:40:17 +03:00
parent f958e9d3cf
commit bf0c07bb1b
5 changed files with 217 additions and 91 deletions

View file

@ -11,7 +11,10 @@ fn parse_simple_select() {
let ast = Parser::parse_sql(&AnsiSqlDialect {}, sql).unwrap();
assert_eq!(1, ast.len());
match ast.first().unwrap() {
SQLStatement::SQLSelect(SQLSelect { projection, .. }) => {
SQLStatement::SQLSelect(SQLQuery {
body: SQLSelect { projection, .. },
..
}) => {
assert_eq!(3, projection.len());
}
_ => assert!(false),