From 2e6e09f642902cba66c7e148a226a557c0784cfe Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Wed, 27 Oct 2021 10:32:30 +0200
Subject: [PATCH] Rename TransactionType cases to ..._ONLY

---
 include/caosdb/transaction.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h
index 3d872f6..adcbfcb 100644
--- a/include/caosdb/transaction.h
+++ b/include/caosdb/transaction.h
@@ -91,11 +91,11 @@
     return StatusCode::TRANSACTION_STATUS_ERROR;                                                   \
   }                                                                                                \
   switch (this->transaction_type) {                                                                \
-  case NONE:                                                                                       \
-    this->transaction_type = TransactionType::DELETE2;                                             \
-  case DELETE2:                                                                                    \
-  case MIXED_WRITE:                                                                                \
-  case MIXED_READ_AND_WRITE:                                                                       \
+  case TransactionType::NONE:                                                                                       \
+    this->transaction_type = TransactionType::DELETE_ONLY;                                             \
+  case TransactionType::DELETE_ONLY:                                                                                    \
+  case TransactionType::MIXED_WRITE:                                                                                \
+  case TransactionType::MIXED_READ_AND_WRITE:                                                                       \
     break;                                                                                         \
   default:                                                                                         \
     CAOSDB_LOG_ERROR_AND_RETURN_STATUS(                                                            \
@@ -114,8 +114,8 @@
   }                                                                                                \
   switch (this->transaction_type) {                                                                \
   case TransactionType::NONE:                                                                      \
-    this->transaction_type = TransactionType::INSERT;                                              \
-  case TransactionType::INSERT:                                                                    \
+    this->transaction_type = TransactionType::INSERT_ONLY;                                              \
+  case TransactionType::INSERT_ONLY:                                                                    \
   case TransactionType::MIXED_WRITE:                                                               \
   case TransactionType::MIXED_READ_AND_WRITE:                                                      \
     break;                                                                                         \
@@ -136,8 +136,8 @@
   }                                                                                                \
   switch (this->transaction_type) {                                                                \
   case TransactionType::NONE:                                                                      \
-    this->transaction_type = TransactionType::INSERT;                                              \
-  case TransactionType::INSERT:                                                                    \
+    this->transaction_type = TransactionType::UPDATE_ONLY;                                              \
+  case TransactionType::UPDATE_ONLY:                                                                    \
   case TransactionType::MIXED_WRITE:                                                               \
   case TransactionType::MIXED_READ_AND_WRITE:                                                      \
     break;                                                                                         \
@@ -288,9 +288,9 @@ public:
   enum TransactionType {
     NONE,                //!< Unspecified or not specified yet.
     READ_ONLY,           //!< Only retrievals (by id, by query)
-    INSERT,              //!< Only insertions
-    UPDATE,              //!< Only updates
-    DELETE2,             //!< Only deletions
+    INSERT_ONLY,              //!< Only insertions
+    UPDATE_ONLY,              //!< Only updates
+    DELETE_ONLY,             //!< Only deletions
     MIXED_WRITE,         //!< Only insertions, deletions, updates
     MIXED_READ_AND_WRITE //!< all kind of transaction.
   };
-- 
GitLab