mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 21:42:05 +00:00
Allow stored procedures to be defined without BEGIN
/END
(#1834)
This commit is contained in:
parent
ac1c339666
commit
6cd237ea43
3 changed files with 56 additions and 54 deletions
|
@ -15505,14 +15505,14 @@ impl<'a> Parser<'a> {
|
|||
let name = self.parse_object_name(false)?;
|
||||
let params = self.parse_optional_procedure_parameters()?;
|
||||
self.expect_keyword_is(Keyword::AS)?;
|
||||
self.expect_keyword_is(Keyword::BEGIN)?;
|
||||
let statements = self.parse_statements()?;
|
||||
self.expect_keyword_is(Keyword::END)?;
|
||||
|
||||
let body = self.parse_conditional_statements(&[Keyword::END])?;
|
||||
|
||||
Ok(Statement::CreateProcedure {
|
||||
name,
|
||||
or_alter,
|
||||
params,
|
||||
body: statements,
|
||||
body,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue