mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
MSSQL: Add support for parenthesized stored procedure name in EXEC (#2126)
This commit is contained in:
parent
048bc8f09d
commit
0b1e0c35d9
2 changed files with 6 additions and 0 deletions
|
|
@ -17368,7 +17368,11 @@ impl<'a> Parser<'a> {
|
|||
{
|
||||
None
|
||||
} else {
|
||||
let has_parentheses = self.consume_token(&Token::LParen);
|
||||
let name = self.parse_object_name(false)?;
|
||||
if has_parentheses {
|
||||
self.expect_token(&Token::RParen)?;
|
||||
}
|
||||
Some(name)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -12120,6 +12120,8 @@ fn parse_execute_stored_procedure() {
|
|||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
// Test optional parentheses around procedure name
|
||||
ms_and_generic().one_statement_parses_to("EXEC ('name')", "EXECUTE 'name'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue