Loading...
Searching...
No Matches
find_options.hpp
Go to the documentation of this file.
// Copyright 2009-present MongoDB, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <mongocxx/v1/find_options-fwd.hpp> // IWYU pragma: export
//
#include <mongocxx/v1/detail/prelude.hpp>
#include <bsoncxx/v1/document/value-fwd.hpp>
#include <bsoncxx/v1/document/view-fwd.hpp>
#include <bsoncxx/v1/types/value-fwd.hpp>
#include <bsoncxx/v1/types/view-fwd.hpp>
#include <mongocxx/v1/hint-fwd.hpp>
#include <mongocxx/v1/read_concern-fwd.hpp>
#include <mongocxx/v1/read_preference-fwd.hpp>
#include <bsoncxx/v1/stdx/optional.hpp>
#include <mongocxx/v1/config/export.hpp>
#include <mongocxx/v1/cursor.hpp>
#include <chrono>
#include <cstdint>
namespace mongocxx {
namespace v1 {
class find_options {
private:
class impl;
void* _impl;
public:
MONGOCXX_ABI_EXPORT_CDECL() ~find_options();
MONGOCXX_ABI_EXPORT_CDECL() find_options(find_options&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) operator=(find_options&& other) noexcept;
MONGOCXX_ABI_EXPORT_CDECL() find_options(find_options const& other);
MONGOCXX_ABI_EXPORT_CDECL(find_options&) operator=(find_options const& other);
MONGOCXX_ABI_EXPORT_CDECL() find_options();
MONGOCXX_ABI_EXPORT_CDECL(find_options&) allow_disk_use(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) allow_disk_use() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) allow_partial_results(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) allow_partial_results() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) batch_size(std::int32_t v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int32_t>) batch_size() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) collation(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) collation() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) comment(bsoncxx::v1::types::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::types::view>) comment() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) cursor_type(v1::cursor::type v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<cursor::type>) cursor_type() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) hint(v1::hint v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::hint>) hint() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) let(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view> const) let() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) limit(std::int64_t v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) limit() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) max(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) max() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) max_await_time(std::chrono::milliseconds v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_await_time() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) max_time(std::chrono::milliseconds v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::chrono::milliseconds>) max_time() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) min(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) min() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) no_cursor_timeout(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) no_cursor_timeout() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) projection(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) projection() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) read_preference(v1::read_preference v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::read_preference>) read_preference() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) read_concern(v1::read_concern v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<v1::read_concern>) read_concern() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) return_key(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) return_key() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) show_record_id(bool v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bool>) show_record_id() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) skip(std::int64_t v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) skip() const;
MONGOCXX_ABI_EXPORT_CDECL(find_options&) sort(bsoncxx::v1::document::value v);
MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::document::view>) sort() const;
class internal;
};
} // namespace v1
} // namespace mongocxx
#include <mongocxx/v1/detail/postlude.hpp>
mongocxx::v1::cursor
A MongoDB cursor.
Definition cursor.hpp:39
mongocxx::v1::find_options::hint
find_options & hint(v1::hint v)
Set the "hint" field.
mongocxx::v1::find_options::read_preference
find_options & read_preference(v1::read_preference v)
Set the "readPreference" field.
mongocxx::v1::find_options::comment
find_options & comment(bsoncxx::v1::types::value v)
Set the "comment" field.
mongocxx::v1::find_options::find_options
find_options(find_options &&other) noexcept
Move constructor.
mongocxx::v1::find_options::max
find_options & max(bsoncxx::v1::document::value v)
Set the "max" field.
mongocxx::v1::find_options::show_record_id
find_options & show_record_id(bool v)
Set the "showRecordId" field.
mongocxx::v1::find_options::batch_size
find_options & batch_size(std::int32_t v)
Set the "batchSize" field.
mongocxx::v1::find_options::read_concern
find_options & read_concern(v1::read_concern v)
Set the "readConcern" field.
mongocxx::v1::find_options::return_key
find_options & return_key(bool v)
Set the "returnKey" field.
mongocxx::v1::find_options::collation
find_options & collation(bsoncxx::v1::document::value v)
Set the "collation" field.
mongocxx::v1::find_options::~find_options
~find_options()
Destroy this object.
mongocxx::v1::find_options::sort
find_options & sort(bsoncxx::v1::document::value v)
Set the "sort" field.
mongocxx::v1::find_options::allow_disk_use
find_options & allow_disk_use(bool v)
Set the "allowDiskUse" field.
mongocxx::v1::find_options::projection
find_options & projection(bsoncxx::v1::document::value v)
Set the "projection" field.
mongocxx::v1::find_options::max_await_time
find_options & max_await_time(std::chrono::milliseconds v)
Set the "maxAwaitTimeMS" field.
mongocxx::v1::find_options::max_time
find_options & max_time(std::chrono::milliseconds v)
Set the "maxTimeMS" field.
mongocxx::v1::find_options::allow_partial_results
find_options & allow_partial_results(bool v)
Set the "allowPartialResults" field.
mongocxx::v1::find_options::no_cursor_timeout
find_options & no_cursor_timeout(bool v)
Set the "noCursorTimeout" field.
mongocxx::v1::find_options::skip
find_options & skip(std::int64_t v)
Set the "skip" field.
mongocxx::v1::find_options::limit
find_options & limit(std::int64_t v)
Set the "limit" field.
mongocxx::v1::find_options::min
find_options & min(bsoncxx::v1::document::value v)
Set the "min" field.
mongocxx::v1::find_options::let
find_options & let(bsoncxx::v1::document::value v)
Set the "let" field.
mongocxx::v1::find_options::cursor_type
find_options & cursor_type(v1::cursor::type v)
Set the "cursorType" field.
find_options-fwd.hpp
Declares mongocxx::v1::find_options.
export.hpp
Provides macros to control the set of symbols exported in the ABI.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
prelude.hpp
The mongocxx v1 macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx::v1
Declares entities whose ABI stability is guaranteed for documented symbols.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
cursor.hpp
Provides mongocxx::v1::cursor.
value-fwd.hpp
Declares bsoncxx::v1::document::value.
view-fwd.hpp
Declares bsoncxx::v1::document::view.
hint-fwd.hpp
Declares mongocxx::v1::hint.
read_concern-fwd.hpp
Declares mongocxx::v1::read_concern.
read_preference-fwd.hpp
Declares mongocxx::v1::read_preference.
optional.hpp
Provides std::optional-related polyfills for library API usage.
value-fwd.hpp
Declares bsoncxx::v1::types::value.
view-fwd.hpp
Declares non-owning, read-only entities representing a BSON type value.