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

WIP: consolidation

parent 494b556b
No related branches found
No related tags found
1 merge request!12F consolidation
Pipeline #12088 passed
Pipeline: caosdb-cppinttest

#12093

    ...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
    #include <exception> // IWYU pragma: keep #include <exception> // IWYU pragma: keep
    // IWYU pragma: no_include <bits/exception.h> // IWYU pragma: no_include <bits/exception.h>
    #include <google/protobuf/arena.h> // for Arena #include <google/protobuf/arena.h> // for Arena
    #include <google/protobuf/generated_message_util.h> // for Arena
    #include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncRe... #include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncRe...
    #include <grpcpp/impl/codegen/client_context.h> // for ClientContext #include <grpcpp/impl/codegen/client_context.h> // for ClientContext
    #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
    ......
    ...@@ -22,12 +22,11 @@ ...@@ -22,12 +22,11 @@
    #include "caosdb/entity/v1alpha1/main.pb.h" // for TransactionRe... #include "caosdb/entity/v1alpha1/main.pb.h" // for TransactionRe...
    #include "caosdb/file_transmission/download_request_handler.h" // Download... #include "caosdb/file_transmission/download_request_handler.h" // Download...
    #include "caosdb/file_transmission/file_reader.h" // for path #include "caosdb/file_transmission/file_reader.h" // for path
    #include "caosdb/file_transmission/register_file_upload_handler.h" #include "caosdb/file_transmission/register_file_upload_handler.h" // for RegisterFileUploadHandler
    #include "caosdb/file_transmission/upload_request_handler.h" // Upload... #include "caosdb/file_transmission/upload_request_handler.h" // Upload...
    #include "caosdb/logging.h" // for CAOSDB_LOG_FATAL #include "caosdb/logging.h" // for CAOSDB_LOG_FATAL
    #include "caosdb/protobuf_helper.h"
    #include "caosdb/status_code.h" // for StatusCode #include "caosdb/status_code.h" // for StatusCode
    #include "caosdb/transaction_handler.h" #include "caosdb/transaction_handler.h" // for EntityTransactionHandler
    #include <algorithm> // for max #include <algorithm> // for max
    #include <boost/filesystem/path.hpp> // for operator<<, path #include <boost/filesystem/path.hpp> // for operator<<, path
    #include <boost/log/core/record.hpp> // for record #include <boost/log/core/record.hpp> // for record
    ...@@ -39,8 +38,7 @@ ...@@ -39,8 +38,7 @@
    #include <exception> // IWYU pragma: keep #include <exception> // IWYU pragma: keep
    #include <google/protobuf/arena.h> // for Arena #include <google/protobuf/arena.h> // for Arena
    #include <google/protobuf/generated_message_util.h> // for CreateMessage... #include <google/protobuf/generated_message_util.h> // for CreateMessage...
    #include <google/protobuf/util/json_util.h> #include <grpc/impl/codegen/gpr_types.h> // for gpr_timespec
    #include <grpc/impl/codegen/gpr_types.h>
    #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
    #include <iosfwd> // for streamsize #include <iosfwd> // for streamsize
    #include <map> // for map, operator!= #include <map> // for map, operator!=
    ...@@ -232,8 +230,6 @@ auto Transaction::InsertEntity(Entity *entity) noexcept -> StatusCode { ...@@ -232,8 +230,6 @@ auto Transaction::InsertEntity(Entity *entity) noexcept -> StatusCode {
    // copy the original entity for the transaction // copy the original entity for the transaction
    entity->CopyTo(proto_entity); entity->CopyTo(proto_entity);
    CAOSDB_DEBUG_MESSAGE_STRING(*proto_entity, out);
    CAOSDB_LOG_DEBUG(logger_name) << "INSERT ENTITY: " << out;
    if (entity->HasFile()) { if (entity->HasFile()) {
    auto *file_transmission_id = entity_request->mutable_upload_id(); auto *file_transmission_id = entity_request->mutable_upload_id();
    entity->SetFileTransmissionId(file_transmission_id); entity->SetFileTransmissionId(file_transmission_id);
    ......
    ...@@ -23,10 +23,18 @@ ...@@ -23,10 +23,18 @@
    #include "caosdb/data_type.h" // for DataType, AtomicDataType #include "caosdb/data_type.h" // for DataType, AtomicDataType
    #include "caosdb/entity.h" // for Entity #include "caosdb/entity.h" // for Entity
    #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType
    #include "caosdb/logging.h" // for CAOSDB_LOG_DEBUG
    #include "caosdb/protobuf_helper.h" // for CAOSDB_DEBUG_...
    #include <boost/log/core/record.hpp> // for record
    #include <boost/log/detail/attachable_sstream_buf.hpp> // for basic_ostring...
    #include <boost/log/sources/record_ostream.hpp> // for operator<<
    #include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_...
    #include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_...
    #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi...
    #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test
    #include <memory> // for allocator #include <iosfwd> // for streamsize
    #include <string> // for allocator
    namespace caosdb::entity { namespace caosdb::entity {
    using ProtoEntity = caosdb::entity::v1alpha1::Entity; using ProtoEntity = caosdb::entity::v1alpha1::Entity;
    ......
    ...@@ -25,16 +25,11 @@ ...@@ -25,16 +25,11 @@
    #include "caosdb/entity.h" // for Entity, Parent, Par... #include "caosdb/entity.h" // for Entity, Parent, Par...
    #include "caosdb/entity/v1alpha1/main.grpc.pb.h" // for EntityTransactionSe... #include "caosdb/entity/v1alpha1/main.grpc.pb.h" // for EntityTransactionSe...
    #include "caosdb/entity/v1alpha1/main.pb.h" // for IdResponse, Message #include "caosdb/entity/v1alpha1/main.pb.h" // for IdResponse, Message
    #include "caosdb/logging.h"
    #include "caosdb/message_code.h" // for MessageCode #include "caosdb/message_code.h" // for MessageCode
    #include "caosdb/protobuf_helper.h" // for get_arena #include "caosdb/protobuf_helper.h" // for get_arena
    #include "caosdb/status_code.h" // for StatusCode, FILE_DO... #include "caosdb/status_code.h" // for StatusCode, FILE_DO...
    #include "caosdb/transaction.h" // for Transaction #include "caosdb/transaction.h" // for Transaction
    #include "caosdb/value.h" // for Value #include "caosdb/value.h" // for Value
    #include <boost/log/core/record.hpp> // for record
    #include <boost/log/sources/record_ostream.hpp> // for record_pump<>:...
    #include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_E...
    #include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_S...
    #include <google/protobuf/arena.h> // for Arena #include <google/protobuf/arena.h> // for Arena
    #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, Sui... #include <gtest/gtest-test-part.h> // for TestPartResult, Sui...
    ...@@ -105,7 +100,7 @@ TEST(test_entity, test_append_property) { ...@@ -105,7 +100,7 @@ TEST(test_entity, test_append_property) {
    entity.AppendProperty(prop); entity.AppendProperty(prop);
    EXPECT_EQ(entity.GetProperties().size(), 1); EXPECT_EQ(entity.GetProperties().size(), 1);
    auto &same_prop = entity.GetProperties().at(0); const auto &same_prop = entity.GetProperties().at(0);
    EXPECT_EQ(prop.GetName(), same_prop.GetName()); EXPECT_EQ(prop.GetName(), same_prop.GetName());
    EXPECT_EQ(prop.GetId(), same_prop.GetId()); EXPECT_EQ(prop.GetId(), same_prop.GetId());
    ...@@ -233,7 +228,7 @@ TEST(test_entity, test_insert_with_property) { ...@@ -233,7 +228,7 @@ TEST(test_entity, test_insert_with_property) {
    EXPECT_EQ(entity.GetProperties().size(), 1); EXPECT_EQ(entity.GetProperties().size(), 1);
    auto &inserted_prop = entity.GetProperties().at(0); const auto &inserted_prop = entity.GetProperties().at(0);
    EXPECT_EQ(prop.GetName(), inserted_prop.GetName()); EXPECT_EQ(prop.GetName(), inserted_prop.GetName());
    EXPECT_EQ(prop.GetId(), inserted_prop.GetId()); EXPECT_EQ(prop.GetId(), inserted_prop.GetId());
    ......
    ...@@ -19,11 +19,12 @@ ...@@ -19,11 +19,12 @@
    * along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
    * *
    */ */
    #include "caosdb/data_type.h" // for DataType, ReferenceDataType
    #include "caosdb/entity.h" // for Entity
    #include "caosdb/entity/v1alpha1/main.pb.h" // for RepeatedPtrField, Message #include "caosdb/entity/v1alpha1/main.pb.h" // for RepeatedPtrField, Message
    #include "caosdb/entity.h" #include <gtest/gtest-message.h> // for Message
    #include "gtest/gtest-message.h" // for Message #include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPa...
    #include "gtest/gtest-test-part.h" // for SuiteApiResolver, TestPa... #include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST
    #include "gtest/gtest_pred_impl.h" // for Test, TestInfo, TEST
    #include <memory> // for allocator #include <memory> // for allocator
    namespace caosdb { namespace caosdb {
    ......
    ...@@ -21,13 +21,15 @@ ...@@ -21,13 +21,15 @@
    */ */
    #include "caosdb/value.h" // for Value #include "caosdb/value.h" // for Value
    #include "caosdb/entity.h" // for Entity
    #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType
    #include <algorithm> // for max
    #include <cmath> // for isnan #include <cmath> // for isnan
    #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi...
    #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test
    #include <memory> // for allocator #include <initializer_list> // for initializer_list
    #include <string> // for string, basic_string
    #include <vector> // for vector
    namespace caosdb::entity { namespace caosdb::entity {
    using ProtoEntity = caosdb::entity::v1alpha1::Entity; using ProtoEntity = caosdb::entity::v1alpha1::Entity;
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment