diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h index f4332883791efe889d6683cbb5ed29fed88592ff..c246bc5905f6f79cd16c2ded29f03ff0d3d52e18 100644 --- a/include/caosdb/transaction.h +++ b/include/caosdb/transaction.h @@ -389,6 +389,23 @@ public: return this->request->requests_size(); } + /** + * Get a JSON representation of the respone. + * + * For debugging. + */ + inline auto ResponseToString() const -> const std::string { + google::protobuf::util::JsonOptions options; + std::string out; + google::protobuf::util::MessageToJsonString(*this->response, &out, options); + return out; + } + + /** + * Get a JSON representation of the request. + * + * For debugging. + */ inline auto RequestToString() const -> const std::string { google::protobuf::util::JsonOptions options; std::string out; diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index f866ca337a382fab7d8a0d7032ed3600be886e7a..93b6f486e8cc476e52200a04745a596a444b0362 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -300,6 +300,9 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { } 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