MongoDB C++ Driver current
Loading...
Searching...
No Matches
change_stream.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <chrono>
18
23
26#include <bsoncxx/types.hpp>
28
30
31namespace mongocxx {
32namespace v_noabi {
33namespace options {
34
39 public:
41
70 full_document(bsoncxx::v_noabi::string::view_or_value full_doc);
71
78 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value> const&)
80
101 full_document_before_change(bsoncxx::v_noabi::string::view_or_value full_doc_before_change);
102
109 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value> const&)
111
123
130 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<std::int32_t> const&)
131 batch_size() const;
132
144 comment(bsoncxx::v_noabi::types::bson_value::view_or_value comment);
145
152 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<
153 bsoncxx::v_noabi::types::bson_value::view_or_value> const&)
154 comment() const;
155
172 resume_after(bsoncxx::v_noabi::document::view_or_value resume_after);
173
180 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
182
201 start_after(bsoncxx::v_noabi::document::view_or_value token);
202
209 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
210 start_after() const;
211
223 collation(bsoncxx::v_noabi::document::view_or_value collation);
224
231 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
232 collation() const;
233
245 MONGOCXX_ABI_EXPORT_CDECL(change_stream&) max_await_time(std::chrono::milliseconds max_time);
246
253 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<std::chrono::milliseconds> const&)
255
271 start_at_operation_time(bsoncxx::v_noabi::types::b_timestamp timestamp);
272
279 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::stdx::optional<bsoncxx::v_noabi::types::b_timestamp> const&)
281
282 private:
283 friend ::mongocxx::v_noabi::client;
284 friend ::mongocxx::v_noabi::collection;
285 friend ::mongocxx::v_noabi::database;
286
287 bsoncxx::v_noabi::document::value as_bson() const;
288
289 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value> _full_document;
290 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value> _full_document_before_change;
291 bsoncxx::v_noabi::stdx::optional<std::int32_t> _batch_size;
292 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value> _comment;
293 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _collation;
294 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _resume_after;
295 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _start_after;
296 bsoncxx::v_noabi::stdx::optional<std::chrono::milliseconds> _max_await_time;
297 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::b_timestamp> _start_at_operation_time;
298};
299
300} // namespace options
301} // namespace v_noabi
302} // namespace mongocxx
303
304#include <mongocxx/config/postlude.hpp>
305
A MongoDB collection.
Definition collection.hpp:87
A MongoDB database.
Definition database.hpp:46
Used by change streams.
Definition change_stream.hpp:38
bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > const & max_await_time() const
The current max_time setting.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > const & comment() const
Gets the current value of the comment option.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & full_document() const
Gets the current fullDocument option.
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & batch_size() const
The current batch size setting.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & collation() const
Retrieves the current collation for this operation.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > const & full_document_before_change() const
Gets the current fullDocumentBeforeChange option.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & start_after() const
Retrieves the current startAfter token for this change stream.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & resume_after() const
Retrieves the current resumeToken for this change stream.
bsoncxx::stdx::optional< bsoncxx::v_noabi::types::b_timestamp > const & start_at_operation_time() const
The current start_at_operation_time setting.
Used by clients.
Definition client.hpp:37
Declares mongocxx::v_noabi::client.
Declares mongocxx::v_noabi::collection.
Declares mongocxx::v_noabi::database.
Provides bsoncxx::v_noabi::document::view_or_value.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::options::change_stream.
Provides bsoncxx::v_noabi::string::view_or_value.
Provides bsoncxx::v_noabi::types::bson_value::view_or_value.
Provides entities used to represent BSON types.