Support Snowflake - allow number as placeholder (e.g. :1) (#1001)

This commit is contained in:
yuval-illumex 2023-10-25 19:53:09 +03:00 committed by GitHub
parent 7993384686
commit 65317edcb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View file

@ -1079,6 +1079,20 @@ fn test_snowflake_trim() {
);
}
#[test]
fn test_number_placeholder() {
let sql_only_select = "SELECT :1";
let select = snowflake().verified_only_select(sql_only_select);
assert_eq!(
&Expr::Value(Value::Placeholder(":1".into())),
expr_from_projection(only(&select.projection))
);
snowflake()
.parse_sql_statements("alter role 1 with name = 'foo'")
.expect_err("should have failed");
}
#[test]
fn parse_position_not_function_columns() {
snowflake_and_generic()