AvivDavid-Satori commented on code in PR #1656:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1656#discussion_r1917925158


##########
src/parser/mod.rs:
##########
@@ -13150,6 +13151,40 @@ impl<'a> Parser<'a> {
         }
     }
 
+    pub fn parse_raiserror(&mut self) -> Result<Statement, ParserError> {
+        self.expect_token(&Token::LParen)?;
+        let message = Box::new(self.parse_expr()?);
+        self.expect_token(&Token::Comma)?;
+        let severity = Box::new(self.parse_expr()?);
+        self.expect_token(&Token::Comma)?;
+        let state = Box::new(self.parse_expr()?);
+        let mut arguments = vec![];
+        if self.consume_token(&Token::Comma) {
+            arguments = self.parse_comma_separated(Parser::parse_expr)?;
+        }
+        self.expect_token(&Token::RParen)?;
+        let mut options = vec![];
+        if self.parse_keyword(Keyword::WITH) {
+            options = 
self.parse_comma_separated(Parser::parse_raiserror_option)?;
+        }
+        Ok(Statement::RaisError {
+            message,
+            severity,
+            state,
+            arguments,
+            options,
+        })
+    }
+
+    pub fn parse_raiserror_option(&mut self) -> Result<RaisErrorOption, 
ParserError> {

Review Comment:
   IMO its better like that since I use it with parse_comma_separated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to