Support VALUES and parenthesized SELECTs as top-level statements

This commit is contained in:
Nikhil Benesch 2019-06-10 10:58:10 -04:00
parent b841dccc2c
commit ce171c2a3d
No known key found for this signature in database
GPG key ID: FCF98542083C5A69
2 changed files with 13 additions and 1 deletions

View file

@ -181,6 +181,14 @@ fn parse_where_delete_statement() {
}
}
#[test]
fn parse_top_level() {
verified_stmt("SELECT 1");
verified_stmt("(SELECT 1)");
verified_stmt("((SELECT 1))");
verified_stmt("VALUES (1)");
}
#[test]
fn parse_simple_select() {
let sql = "SELECT id, fname, lname FROM customer WHERE id = 1 LIMIT 5";