Merge pull request #76 from benesch/select-all

Support SELECT ALL
This commit is contained in:
Nickolay Ponomarev 2019-05-30 02:35:18 +03:00 committed by GitHub
commit 86a2fbd8e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -135,6 +135,20 @@ fn parse_select_distinct() {
);
}
#[test]
fn parse_select_all() {
one_statement_parses_to("SELECT ALL name FROM customer", "SELECT name FROM customer");
}
#[test]
fn parse_select_all_distinct() {
let result = parse_sql_statements("SELECT ALL DISTINCT name FROM customer");
assert_eq!(
ParserError::ParserError("Cannot specify both ALL and DISTINCT in SELECT".to_string()),
result.unwrap_err(),
);
}
#[test]
fn parse_select_wildcard() {
let sql = "SELECT * FROM foo";