We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44ceeda commit 8381291Copy full SHA for 8381291
1 file changed
tests/sqlparser_common.rs
@@ -11125,8 +11125,15 @@ fn parse_trailing_comma() {
11125
);
11126
trailing_commas.verified_stmt(r#"SELECT "from" FROM "from""#);
11127
11128
- // doesn't allow all trailing commas
11129
- let trailing_commas = TestedDialects::new(vec![Box::new(GenericDialect {})]);
+ // doesn't allow any trailing commas
+ let trailing_commas = TestedDialects::new(vec![Box::new(PostgreSqlDialect {})]);
11130
+
11131
+ assert_eq!(
11132
+ trailing_commas
11133
+ .parse_sql_statements("SELECT name, age, from employees;")
11134
+ .unwrap_err(),
11135
+ ParserError::ParserError("Expected an expression, found: from".to_string())
11136
+ );
11137
11138
assert_eq!(
11139
trailing_commas
0 commit comments