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

WIP: files

parent 1ad2645e
Branches
Tags
1 merge request!11F files
Pipeline #11918 failed
......@@ -176,7 +176,8 @@ using caosdb::entity::v1alpha1::MultiTransactionResponse;
using caosdb::entity::v1alpha1::RegisterFileUploadRequest;
using caosdb::entity::v1alpha1::RegisterFileUploadResponse;
using caosdb::transaction::TransactionStatus;
using TransactionResponseCase = caosdb::entity::v1alpha1::TransactionResponse::TransactionResponseCase;
using TransactionResponseCase =
caosdb::entity::v1alpha1::TransactionResponse::TransactionResponseCase;
class Transaction;
......
......@@ -452,7 +452,8 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
switch (retrieve_response->retrieve_response_case()) {
case RetrieveResponseCase::kEntityResponse: {
auto *retrieve_entity_response = retrieve_response->release_entity_response();
auto *retrieve_entity_response =
retrieve_response->release_entity_response();
result = std::make_unique<Entity>(retrieve_entity_response);
} break;
case RetrieveResponseCase::kSelectResult: {
......@@ -464,7 +465,8 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
this->query_count = retrieve_response->count_result();
} break;
case RetrieveResponseCase::kFindResult: {
for (auto &entity_response : *retrieve_response->mutable_find_result()->mutable_result_set()) {
for (auto &entity_response :
*retrieve_response->mutable_find_result()->mutable_result_set()) {
result = std::make_unique<Entity>(&entity_response);
if (result->HasErrors()) {
set_error = true;
......@@ -546,17 +548,20 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
}
case TransactionResponseCase::kInsertResponse: {
auto *inserted_id_response = sub_response.mutable_insert_response()->release_id_response();
auto *inserted_id_response =
sub_response.mutable_insert_response()->release_id_response();
result = std::make_unique<Entity>(inserted_id_response);
break;
}
case TransactionResponseCase::kDeleteResponse: {
auto *deleted_id_response = sub_response.mutable_delete_response()->release_id_response();
auto *deleted_id_response =
sub_response.mutable_delete_response()->release_id_response();
result = std::make_unique<Entity>(deleted_id_response);
break;
}
case TransactionResponseCase::kUpdateResponse: {
auto *updated_id_response = sub_response.mutable_update_response()->release_id_response();
auto *updated_id_response =
sub_response.mutable_update_response()->release_id_response();
result = std::make_unique<Entity>(updated_id_response);
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment