alamb commented on code in PR #1718:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1718#discussion_r1966760320


##########
src/ast/mod.rs:
##########
@@ -3058,6 +3058,33 @@ pub enum Statement {
         begin: bool,
         transaction: Option<BeginTransactionKind>,
         modifier: Option<TransactionModifier>,
+        /// List of statements belonging to the `BEGIN` block.
+        /// Example:
+        /// ```sql
+        /// BEGIN
+        ///     SELECT 1;
+        ///     SELECT 2;
+        /// END;
+        /// ```
+        statements: Vec<Statement>,
+        /// TRUE if the statement has a
+        /// `EXCEPTION WHEN ERROR THEN` clause
+        /// Example:
+        /// ```sql
+        /// BEGIN
+        ///     SELECT 1;
+        ///     SELECT 2;
+        /// EXCEPTION WHEN ERROR THEN
+        ///     SELECT 3;
+        /// END;
+        /// ```
+        /// 
<https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language#beginexceptionend>
+        has_exception_when_clause: bool,

Review Comment:
   I think using the somewhat akward `Option<Vec<..>>` would allow the 
different syntax.
   
   I can help if that would be good



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to