iffyio commented on code in PR #1565:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1565#discussion_r1862429680
##########
src/ast/mod.rs:
##########
@@ -5133,6 +5138,24 @@ pub enum TruncateCascadeOption {
Restrict,
}
+/// Transaction started with [ TRANSACTION | WORK ]
+#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
+pub enum TransactionWorkOption {
Review Comment:
```suggestion
pub enum BeginTransactionKind {
```
Or something similarly generic? so that if the variant gets extended the
enum isn't affected
##########
tests/sqlparser_sqlite.rs:
##########
@@ -527,9 +527,6 @@ fn parse_start_transaction_with_modifier() {
sqlite_and_generic().verified_stmt("BEGIN DEFERRED TRANSACTION");
sqlite_and_generic().verified_stmt("BEGIN IMMEDIATE TRANSACTION");
sqlite_and_generic().verified_stmt("BEGIN EXCLUSIVE TRANSACTION");
- sqlite_and_generic().one_statement_parses_to("BEGIN DEFERRED", "BEGIN
DEFERRED TRANSACTION");
- sqlite_and_generic().one_statement_parses_to("BEGIN IMMEDIATE", "BEGIN
IMMEDIATE TRANSACTION");
- sqlite_and_generic().one_statement_parses_to("BEGIN EXCLUSIVE", "BEGIN
EXCLUSIVE TRANSACTION");
Review Comment:
were the removed tests containing invalid sql?
--
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]