diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bca6d4..7d8367d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Parsing server URLs with an additional path, [PR-102](https://github.com/reductstore/reduct-cpp/pull/102) +- Fix Multi-entry API implementation,[PR-108](https://github.com/reductstore/reduct-cpp/pull/108) ## [1.17.1] - 2025-11-17 diff --git a/src/reduct/bucket.cc b/src/reduct/bucket.cc index a25fd73..473dc37 100644 --- a/src/reduct/bucket.cc +++ b/src/reduct/bucket.cc @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ReductSoftware UG +// Copyright 2022-2026 ReductSoftware UG #include "reduct/bucket.h" #define FMT_HEADER_ONLY 1 @@ -23,6 +23,7 @@ #include "reduct/internal/batch_v1.h" #include "reduct/internal/batch_v2.h" +#include "reduct/internal/headers.h" #include "reduct/internal/http_client.h" #include "reduct/internal/serialisation.h" @@ -165,15 +166,27 @@ class Bucket : public IBucket { } Result WriteBatch(std::string_view entry_name, BatchCallback callback) const noexcept override { - return ProcessBatch(entry_name, std::move(callback), BatchType::kWrite); + return ProcessBatchV1(entry_name, std::move(callback), BatchType::kWrite); + } + + Result WriteBatch(BatchCallback callback) const noexcept override { + return ProcessBatchV2(std::move(callback), BatchType::kWrite); } Result UpdateBatch(std::string_view entry_name, BatchCallback callback) const noexcept override { - return ProcessBatch(entry_name, std::move(callback), BatchType::kUpdate); + return ProcessBatchV1(entry_name, std::move(callback), BatchType::kUpdate); + } + + Result UpdateBatch(BatchCallback callback) const noexcept override { + return ProcessBatchV2(std::move(callback), BatchType::kUpdate); } Result RemoveBatch(std::string_view entry_name, BatchCallback callback) const noexcept override { - return ProcessBatch(entry_name, std::move(callback), BatchType::kRemove); + return ProcessBatchV1(entry_name, std::move(callback), BatchType::kRemove); + } + + Result RemoveBatch(BatchCallback callback) const noexcept override { + return ProcessBatchV2(std::move(callback), BatchType::kRemove); } Error Update(std::string_view entry_name, const WriteOptions& options) const noexcept override { @@ -209,16 +222,30 @@ class Bucket : public IBucket { Error Query(std::string_view entry_name, std::optional