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

    ......@@ -59,16 +59,17 @@
    #include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_...
    #include <exception> // IWYU pragma: keep
    // IWYU pragma: no_include <bits/exception.h>
    #include <google/protobuf/arena.h> // for Arena
    #include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncRe...
    #include <grpcpp/impl/codegen/client_context.h> // for ClientContext
    #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
    #include <grpcpp/impl/codegen/status.h> // for Status
    #include <grpcpp/impl/codegen/status_code_enum.h> // for OK, UNAUTHENT...
    #include <iostream> // for char_traits
    #include <stdexcept> // for runtime_error
    #include <string> // for string, opera...
    #include <utility> // for move
    #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/client_context.h> // for ClientContext
    #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
    #include <grpcpp/impl/codegen/status.h> // for Status
    #include <grpcpp/impl/codegen/status_code_enum.h> // for OK, UNAUTHENT...
    #include <iostream> // for char_traits
    #include <stdexcept> // for runtime_error
    #include <string> // for string, opera...
    #include <utility> // for move
    namespace caosdb::transaction {
    using caosdb::StatusCode;
    ......
    ......@@ -22,15 +22,14 @@
    #include "caosdb/entity/v1alpha1/main.pb.h" // for TransactionRe...
    #include "caosdb/file_transmission/download_request_handler.h" // Download...
    #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/logging.h" // for CAOSDB_LOG_FATAL
    #include "caosdb/protobuf_helper.h"
    #include "caosdb/status_code.h" // for StatusCode
    #include "caosdb/transaction_handler.h"
    #include <algorithm> // for max
    #include <boost/filesystem/path.hpp> // for operator<<, path
    #include <boost/log/core/record.hpp> // for record
    #include "caosdb/logging.h" // for CAOSDB_LOG_FATAL
    #include "caosdb/status_code.h" // for StatusCode
    #include "caosdb/transaction_handler.h" // for EntityTransactionHandler
    #include <algorithm> // for max
    #include <boost/filesystem/path.hpp> // for operator<<, path
    #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 basic_record_...
    #include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_...
    ......@@ -39,14 +38,13 @@
    #include <exception> // IWYU pragma: keep
    #include <google/protobuf/arena.h> // for Arena
    #include <google/protobuf/generated_message_util.h> // for CreateMessage...
    #include <google/protobuf/util/json_util.h>
    #include <grpc/impl/codegen/gpr_types.h>
    #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
    #include <iosfwd> // for streamsize
    #include <map> // for map, operator!=
    #include <memory> // for unique_ptr
    #include <stdexcept> // for out_of_range
    #include <utility> // for move, pair
    #include <grpc/impl/codegen/gpr_types.h> // for gpr_timespec
    #include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
    #include <iosfwd> // for streamsize
    #include <map> // for map, operator!=
    #include <memory> // for unique_ptr
    #include <stdexcept> // for out_of_range
    #include <utility> // for move, pair
    namespace caosdb {
    ......@@ -232,8 +230,6 @@ auto Transaction::InsertEntity(Entity *entity) noexcept -> StatusCode {
    // copy the original entity for the transaction
    entity->CopyTo(proto_entity);
    CAOSDB_DEBUG_MESSAGE_STRING(*proto_entity, out);
    CAOSDB_LOG_DEBUG(logger_name) << "INSERT ENTITY: " << out;
    if (entity->HasFile()) {
    auto *file_transmission_id = entity_request->mutable_upload_id();
    entity->SetFileTransmissionId(file_transmission_id);
    ......
    ......@@ -23,10 +23,18 @@
    #include "caosdb/data_type.h" // for DataType, AtomicDataType
    #include "caosdb/entity.h" // for Entity
    #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType
    #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi...
    #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test
    #include <memory> // for allocator
    #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-test-part.h> // for TestPartResult, SuiteApi...
    #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test
    #include <iosfwd> // for streamsize
    #include <string> // for allocator
    namespace caosdb::entity {
    using ProtoEntity = caosdb::entity::v1alpha1::Entity;
    ......
    ......@@ -25,20 +25,15 @@
    #include "caosdb/entity.h" // for Entity, Parent, Par...
    #include "caosdb/entity/v1alpha1/main.grpc.pb.h" // for EntityTransactionSe...
    #include "caosdb/entity/v1alpha1/main.pb.h" // for IdResponse, Message
    #include "caosdb/logging.h"
    #include "caosdb/message_code.h" // for MessageCode
    #include "caosdb/protobuf_helper.h" // for get_arena
    #include "caosdb/status_code.h" // for StatusCode, FILE_DO...
    #include "caosdb/transaction.h" // for Transaction
    #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 <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, Sui...
    #include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ
    #include "caosdb/message_code.h" // for MessageCode
    #include "caosdb/protobuf_helper.h" // for get_arena
    #include "caosdb/status_code.h" // for StatusCode, FILE_DO...
    #include "caosdb/transaction.h" // for Transaction
    #include "caosdb/value.h" // for Value
    #include <google/protobuf/arena.h> // for Arena
    #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, Sui...
    #include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ
    #include <iostream>
    #include <memory> // for allocator, shared_ptr
    #include <string> // for operator+, string
    ......@@ -105,7 +100,7 @@ TEST(test_entity, test_append_property) {
    entity.AppendProperty(prop);
    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.GetId(), same_prop.GetId());
    ......@@ -233,7 +228,7 @@ TEST(test_entity, test_insert_with_property) {
    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.GetId(), inserted_prop.GetId());
    ......
    ......@@ -19,12 +19,13 @@
    * 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.h"
    #include "gtest/gtest-message.h" // for Message
    #include "gtest/gtest-test-part.h" // for SuiteApiResolver, TestPa...
    #include "gtest/gtest_pred_impl.h" // for Test, TestInfo, TEST
    #include <memory> // for allocator
    #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPa...
    #include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST
    #include <memory> // for allocator
    namespace caosdb {
    using ProtoEntity = caosdb::entity::v1alpha1::Entity;
    ......
    ......@@ -21,13 +21,15 @@
    */
    #include "caosdb/value.h" // for Value
    #include "caosdb/entity.h" // for Entity
    #include "caosdb/entity/v1alpha1/main.pb.h" // for AtomicDataType, DataType
    #include <algorithm> // for max
    #include <cmath> // for isnan
    #include <gtest/gtest-message.h> // for Message
    #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi...
    #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 {
    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