From 5135df76ef5088dc0b352fe7781cbb4632e36198 Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Thu, 12 Aug 2021 15:20:34 +0200
Subject: [PATCH] MAINT; Remove commented code

---
 src/caosdb/transaction.cpp | 53 --------------------------------------
 1 file changed, 53 deletions(-)

diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp
index 403b6c1..0a7cedd 100644
--- a/src/caosdb/transaction.cpp
+++ b/src/caosdb/transaction.cpp
@@ -277,55 +277,6 @@ auto Transaction::ExecuteAsynchronously() noexcept -> StatusCode {
 }
 
 auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
-  // if (this->response->responses_size() == 1) {
-  // auto *responses = this->response->mutable_responses(0);
-  // switch (responses->wrapped_response_case()) {
-  // case WrappedResponseCase::kRetrieveResponse: {
-  // auto *retrieve_response = responses->mutable_retrieve_response();
-  // switch (retrieve_response->query_response_case()) {
-  // case QueryResponseCase::kEntity: {
-  // auto *entity = retrieve_response->release_entity();
-  // if (!entity->errors().empty()) {
-  // this->status = TransactionStatus::TRANSACTION_ERROR(
-  //"The request returned with errors.");
-  //}
-  // this->result_set = std::make_unique<UniqueResult>(entity);
-  //} break;
-  // case QueryResponseCase::kSelectResult: {
-  //// TODO(tf) Select queries
-  //} break;
-  // case QueryResponseCase::kCountResult: {
-  // this->query_count = retrieve_response->count_result();
-  // std::vector<std::unique_ptr<Entity>> entities;
-  // this->result_set =
-  // std::make_unique<MultiResultSet>(std::move(entities));
-  //} break;
-  // default:
-  //// TODO(tf) Error
-  // break;
-  //}
-  //} break;
-  // case WrappedResponseCase::kUpdateResponse: {
-  // auto *updatedIdResponse = responses->mutable_update_response();
-  // if (!updatedIdResponse->entity_errors().empty()) {
-  // this->status = TransactionStatus::TRANSACTION_ERROR(
-  //"The request returned with errors.");
-  //}
-  // this->result_set = std::make_unique<UniqueResult>(updatedIdResponse);
-  //} break;
-  // case WrappedResponseCase::kInsertResponse: {
-  // auto *insertedIdResponse = responses->mutable_insert_response();
-  // if (!insertedIdResponse->entity_errors().empty()) {
-  // this->status = TransactionStatus::TRANSACTION_ERROR(
-  //"The request returned with errors.");
-  //}
-  // this->result_set = std::make_unique<UniqueResult>(insertedIdResponse);
-  //} break;
-  // default:
-  //// TODO(tf) Error and Update
-  // break;
-  //}
-  //} else {
   auto *responses = this->response->mutable_responses();
   std::vector<std::unique_ptr<Entity>> entities;
   for (auto sub_response : *responses) {
@@ -354,10 +305,6 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
       break;
     }
 
-    // case WrappedResponseCase::kRetrieveResponse:
-    // auto *retrieve_entity_response =
-    // sub_response.mutable_retrieve_response()->release_entity(); result =
-    // std::make_unique<Entity>(retrieve_entity_response); break;
     case WrappedResponseCase::kInsertResponse: {
       auto *inserted_id_response = sub_response.release_insert_response();
       result = std::make_unique<Entity>(inserted_id_response);
-- 
GitLab