Skip to content
Snippets Groups Projects
Verified Commit 43fdade1 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: fix enum

parent 1718f5b1
No related branches found
No related tags found
1 merge request!3Better Error Handling and Logging
Pipeline #10713 failed
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
...@@ -54,7 +54,7 @@ private: ...@@ -54,7 +54,7 @@ private:
std::unique_ptr<Entity> entity; 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()` * @brief Create a transaction via `CaosDBConnection.createTransaction()`
...@@ -62,7 +62,7 @@ enum TransactionState { INIT = 10, EXECUTING = 20, SUCCESS = 30, ERROR = 40 }; ...@@ -62,7 +62,7 @@ enum TransactionState { INIT = 10, EXECUTING = 20, SUCCESS = 30, ERROR = 40 };
class Transaction { class Transaction {
private: private:
std::unique_ptr<ResultSet> result_set; std::unique_ptr<ResultSet> result_set;
TransactionState state = TransactionState::INIT; TransactionState state = TransactionState::TS_INIT;
std::shared_ptr<EntityTransactionService::Stub> service_stub; std::shared_ptr<EntityTransactionService::Stub> service_stub;
RetrieveRequest request; // TODO(tf) RetrieveRequest request; // TODO(tf)
......
...@@ -57,7 +57,7 @@ auto Transaction::RetrieveById(const std::string &id) -> void { ...@@ -57,7 +57,7 @@ auto Transaction::RetrieveById(const std::string &id) -> void {
auto Transaction::Execute() -> void { auto Transaction::Execute() -> void {
// TODO(tf) throw error if not int INIT state // TODO(tf) throw error if not int INIT state
this->state = TransactionState::EXECUTING; this->state = TransactionState::TS_EXECUTING;
RetrieveResponse response; RetrieveResponse response;
grpc::ClientContext context; grpc::ClientContext context;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment