MongoDB C++ Driver
mongocxx-3.11.0
Loading...
Searching...
No Matches
mongocxx
v_noabi
mongocxx
options
range.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 <cstdint>
18
19
#include <
mongocxx/options/range-fwd.hpp
>
20
21
#include <
bsoncxx/types.hpp
>
22
#include <
bsoncxx/types/bson_value/view_or_value.hpp
>
23
24
#include <
mongocxx/stdx.hpp
>
25
26
#include <
mongocxx/config/prelude.hpp
>
27
28
namespace
mongocxx
{
29
namespace
v_noabi {
30
namespace
options {
31
42
class
range
{
43
public
:
46
MONGOCXX_ABI_EXPORT_CDECL
(
range
&)
min
(
bsoncxx::v_noabi::types::bson_value::view_or_value
value);
47
50
MONGOCXX_ABI_EXPORT_CDECL
(
51
const
stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value>
&)
52
min
() const;
53
56
MONGOCXX_ABI_EXPORT_CDECL
(
range
&)
max
(
bsoncxx
::v_noabi::types::bson_value::view_or_value value);
57
60
MONGOCXX_ABI_EXPORT_CDECL
(
61
const stdx::optional<
bsoncxx
::v_noabi::types::bson_value::view_or_value>&)
62
max
() const;
63
65
MONGOCXX_ABI_EXPORT_CDECL
(
range
&)
sparsity
(
std
::int64_t value);
66
68
MONGOCXX_ABI_EXPORT_CDECL
(const stdx::optional<
std
::int64_t>&)
sparsity
() const;
69
71
MONGOCXX_ABI_EXPORT_CDECL
(
range
&)
trim_factor
(
std
::int32_t value);
72
74
MONGOCXX_ABI_EXPORT_CDECL
(const stdx::optional<
std
::int32_t>&)
trim_factor
() const;
75
78
MONGOCXX_ABI_EXPORT_CDECL
(
range
&)
precision
(
std
::int32_t value);
79
82
MONGOCXX_ABI_EXPORT_CDECL
(const stdx::optional<
std
::int32_t>&)
precision
() const;
83
84
private:
85
stdx::optional<
bsoncxx
::v_noabi::types::bson_value::view_or_value> _min;
86
stdx::optional<
bsoncxx
::v_noabi::types::bson_value::view_or_value> _max;
87
stdx::optional<
std
::int64_t> _sparsity;
88
stdx::optional<
std
::int32_t> _trim_factor;
89
stdx::optional<
std
::int32_t> _precision;
90
};
91
92
}
// namespace options
93
}
// namespace v_noabi
94
}
// namespace mongocxx
95
96
// CXX-2770: missing include of postlude header.
97
#if defined(MONGOCXX_TEST_MACRO_GUARDS_FIX_MISSING_POSTLUDE)
98
#include <
mongocxx/config/postlude.hpp
>
99
#endif
100
bsoncxx::v_noabi::stdx::optional
A polyfill for std::optional<T>.
Definition
optional.hpp:874
bsoncxx::v_noabi::view_or_value< view, value >
mongocxx::v_noabi::options::range
RangeOpts specifies index options for a Queryable Encryption field supporting "range" queries.
Definition
range.hpp:42
mongocxx::v_noabi::options::range::min
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & min() const
Gets RangeOpts.min.
mongocxx::v_noabi::options::range::precision
const stdx::optional< std::int32_t > & precision() const
Gets RangeOpts.precision.
mongocxx::v_noabi::options::range::min
range & min(bsoncxx::v_noabi::types::bson_value::view_or_value value)
Sets RangeOpts.min.
mongocxx::v_noabi::options::range::max
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & max() const
Gets RangeOpts.max.
mongocxx::v_noabi::options::range::sparsity
const stdx::optional< std::int64_t > & sparsity() const
Gets RangeOpts.sparsity.
mongocxx::v_noabi::options::range::trim_factor
const stdx::optional< std::int32_t > & trim_factor() const
Gets RangeOpts.trimFactor.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition
fwd.hpp:222
postlude.hpp
The mongocxx macro guard postlude header.
prelude.hpp
The mongocxx macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
std
The top-level namespace reserved for the C++ standard library.
range-fwd.hpp
Declares mongocxx::v_noabi::options::range.
stdx.hpp
Redeclares bsoncxx::v_noabi::stdx in mongocxx::v_noabi::stdx for internal use.
view_or_value.hpp
Provides bsoncxx::v_noabi::types::bson_value::view_or_value.
types.hpp
Provides entities used to represent BSON types.
Generated by
1.12.0