6#include <userver/storages/mongo/bulk_ops.hpp>
7#include <userver/storages/mongo/options.hpp>
8#include <userver/utils/fast_pimpl.hpp>
10USERVER_NAMESPACE_BEGIN
12namespace storages::mongo::impl::cdriver {
13class CDriverCollectionImpl;
21 enum class Mode { kOrdered, kUnordered };
26 Bulk(
const Bulk&) =
delete;
27 Bulk(
Bulk&&)
noexcept;
28 Bulk& operator=(
const Bulk&) =
delete;
38 template <
typename... Options>
43 template <
typename... Options>
48 template <
typename... Options>
53 template <
typename... Options>
57 template <
typename... Options>
61 template <
typename... Options>
73 friend class storages::mongo::impl::cdriver::CDriverCollectionImpl;
76 static constexpr size_t kSize = 56;
77 static constexpr size_t kAlignment = 8;
79 utils::FastPimpl<Impl, kSize, kAlignment,
false> impl_;
82template <
typename... Options>
85 (insert_subop.SetOption(std::forward<Options>(options)), ...);
89template <
typename... Options>
92 (replace_subop.SetOption(std::forward<Options>(options)), ...);
93 Append(replace_subop);
96template <
typename... Options>
99 (update_subop.SetOption(std::forward<Options>(options)), ...);
100 Append(update_subop);
103template <
typename... Options>
106 (update_subop.SetOption(std::forward<Options>(options)), ...);
107 Append(update_subop);
110template <
typename... Options>
113 (delete_subop.SetOption(std::forward<Options>(options)), ...);
114 Append(delete_subop);
117template <
typename... Options>
120 (delete_subop.SetOption(std::forward<Options>(options)), ...);
121 Append(delete_subop);