MongoDB C++ Driver mongocxx-4.0.0
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
79 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>&)
81
102 full_document_before_change(bsoncxx::v_noabi::string::view_or_value full_doc_before_change);
103
111 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>&)
113
125
132 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<std::int32_t>&)
133 batch_size() const;
134
146 comment(bsoncxx::v_noabi::types::bson_value::view_or_value comment);
147
155 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value>&)
156 comment() const;
157
174 resume_after(bsoncxx::v_noabi::document::view_or_value resume_after);
175
183 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
185
204 start_after(bsoncxx::v_noabi::document::view_or_value token);
205
213 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
214 start_after() const;
215
227 collation(bsoncxx::v_noabi::document::view_or_value collation);
228
236 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
237 collation() const;
238
251
258 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<std::chrono::milliseconds>&)
260
276 start_at_operation_time(bsoncxx::v_noabi::types::b_timestamp timestamp);
277
284 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::stdx::optional<bsoncxx::v_noabi::types::b_timestamp>&)
286
287 private:
288 friend ::mongocxx::v_noabi::client;
289 friend ::mongocxx::v_noabi::collection;
290 friend ::mongocxx::v_noabi::database;
291
292 bsoncxx::v_noabi::document::value as_bson() const;
293
294 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value> _full_document;
295 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::string::view_or_value>
296 _full_document_before_change;
297 bsoncxx::v_noabi::stdx::optional<std::int32_t> _batch_size;
298 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value> _comment;
299 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _collation;
300 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _resume_after;
301 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _start_after;
302 bsoncxx::v_noabi::stdx::optional<std::chrono::milliseconds> _max_await_time;
303 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::b_timestamp> _start_at_operation_time;
304};
305
306} // namespace options
307} // namespace v_noabi
308} // namespace mongocxx
309
310#include <mongocxx/config/postlude.hpp>
311
Class representing server side document groupings within a MongoDB database.
Definition collection.hpp:87
Class representing a MongoDB database.
Definition database.hpp:46
Class representing MongoDB change stream options.
Definition change_stream.hpp:38
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & resume_after() const
Retrieves the current resumeToken for this change stream.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation() const
Retrieves the current collation for this operation.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & start_after() const
Retrieves the current startAfter token for this change stream.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & comment() const
Gets the current value of the comment option.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > & full_document_before_change() const
Gets the current fullDocumentBeforeChange option.
const bsoncxx::v_noabi::stdx::optional< std::int32_t > & batch_size() const
The current batch size setting.
const bsoncxx::stdx::optional< bsoncxx::v_noabi::types::b_timestamp > & start_at_operation_time() const
The current start_at_operation_time setting.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::string::view_or_value > & full_document() const
Gets the current fullDocument option.
const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & max_await_time() const
The current max_time setting.
Class representing the optional arguments to a MongoDB driver client object.
Definition client.hpp:39
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 fwd.hpp:204
The mongocxx 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.
The top-level namespace reserved for the C++ standard library.
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.