diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h index b7d419b5418649e2738d530fba6ff4ccf1decbb0..8f606c64cd783fd518a8947cebb74b2dfe475d07 100644 --- a/include/caosdb/transaction.h +++ b/include/caosdb/transaction.h @@ -54,7 +54,7 @@ private: std::unique_ptr<Entity> entity; }; -enum TransactionState { INIT = 10, EXECUTING = 20, SUCCESS = 30, ERROR = 40 }; +enum TransactionState { TS_INIT = 10, TS_EXECUTING = 20, TS_SUCCESS = 30, TS_ERROR = 40 }; /** * @brief Create a transaction via `CaosDBConnection.createTransaction()` @@ -62,7 +62,7 @@ enum TransactionState { INIT = 10, EXECUTING = 20, SUCCESS = 30, ERROR = 40 }; class Transaction { private: std::unique_ptr<ResultSet> result_set; - TransactionState state = TransactionState::INIT; + TransactionState state = TransactionState::TS_INIT; std::shared_ptr<EntityTransactionService::Stub> service_stub; RetrieveRequest request; // TODO(tf) diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index 7adcb21398bbd565af41737258e2dda9008df88b..0c357840b5ad15594d9953955a32b88e08d27412 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -57,7 +57,7 @@ auto Transaction::RetrieveById(const std::string &id) -> void { auto Transaction::Execute() -> void { // TODO(tf) throw error if not int INIT state - this->state = TransactionState::EXECUTING; + this->state = TransactionState::TS_EXECUTING; RetrieveResponse response; grpc::ClientContext context;