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


##########
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:
   Yeah I think that makes sense, I initially figured to use an explicit flag 
in case it was possible to have exception statements with a different syntax 
but probably no need to do that unless necessary, will update to use an option!



-- 
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