mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-16 04:54:59 +00:00
add support for CALL statements (#1063)
This commit is contained in:
parent
8d97330d42
commit
1933f194e7
3 changed files with 89 additions and 11 deletions
|
@ -7949,6 +7949,29 @@ fn parse_create_type() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_call() {
|
||||
all_dialects().verified_stmt("CALL my_procedure()");
|
||||
all_dialects().verified_stmt("CALL my_procedure(1, 'a')");
|
||||
pg_and_generic().verified_stmt("CALL my_procedure(1, 'a', $1)");
|
||||
all_dialects().verified_stmt("CALL my_procedure");
|
||||
assert_eq!(
|
||||
verified_stmt("CALL my_procedure('a')"),
|
||||
Statement::Call(Function {
|
||||
args: vec![FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Value(
|
||||
Value::SingleQuotedString("a".to_string())
|
||||
))),],
|
||||
name: ObjectName(vec![Ident::new("my_procedure")]),
|
||||
filter: None,
|
||||
null_treatment: None,
|
||||
over: None,
|
||||
distinct: false,
|
||||
special: false,
|
||||
order_by: vec![]
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_create_table_collate() {
|
||||
pg_and_generic().verified_stmt("CREATE TABLE tbl (foo INT, bar TEXT COLLATE \"de_DE\")");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue