mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
MSSQL: Add support for EXEC output and default keywords (#1940)
This commit is contained in:
parent
750a7aa054
commit
9b9ffe450c
4 changed files with 47 additions and 4 deletions
|
@ -11393,6 +11393,8 @@ fn parse_execute_stored_procedure() {
|
|||
immediate: false,
|
||||
using: vec![],
|
||||
into: vec![],
|
||||
output: false,
|
||||
default: false,
|
||||
};
|
||||
assert_eq!(
|
||||
// Microsoft SQL Server does not use parentheses around arguments for EXECUTE
|
||||
|
@ -11407,6 +11409,18 @@ fn parse_execute_stored_procedure() {
|
|||
),
|
||||
expected
|
||||
);
|
||||
match ms_and_generic().verified_stmt("EXECUTE dbo.proc1 @ReturnVal = @X OUTPUT") {
|
||||
Statement::Execute { output, .. } => {
|
||||
assert!(output);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
match ms_and_generic().verified_stmt("EXECUTE dbo.proc1 DEFAULT") {
|
||||
Statement::Execute { default, .. } => {
|
||||
assert!(default);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -11425,6 +11439,8 @@ fn parse_execute_immediate() {
|
|||
into: vec![Ident::new("a")],
|
||||
name: None,
|
||||
has_parentheses: false,
|
||||
output: false,
|
||||
default: false,
|
||||
};
|
||||
|
||||
let stmt = dialects.verified_stmt("EXECUTE IMMEDIATE 'SELECT 1' INTO a USING 1 AS b");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue