MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
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
20
21#include <bsoncxx/types.hpp>
23
25
26namespace mongocxx {
27namespace v_noabi {
28namespace options {
29
40class range {
41 public:
45
50 min() const;
51
54 MONGOCXX_ABI_EXPORT_CDECL(range&) max(bsoncxx::v_noabi::types::bson_value::view_or_value value);
55
59 const bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value>&)
60 max() const;
61
64
66 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<std::int64_t>&)
67 sparsity() const;
68
71
73 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<std::int32_t>&)
74 trim_factor() const;
75
79
82 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<std::int32_t>&)
83 precision() const;
84
85 private:
86 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value> _min;
87 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::types::bson_value::view_or_value> _max;
88 bsoncxx::v_noabi::stdx::optional<std::int64_t> _sparsity;
89 bsoncxx::v_noabi::stdx::optional<std::int32_t> _trim_factor;
90 bsoncxx::v_noabi::stdx::optional<std::int32_t> _precision;
91};
92
93} // namespace options
94} // namespace v_noabi
95} // namespace mongocxx
96
97#include <mongocxx/config/postlude.hpp>
98
A polyfill for std::optional<T>.
Definition optional.hpp:826
RangeOpts specifies index options for a Queryable Encryption field supporting "range" queries.
Definition range.hpp:40
const bsoncxx::v_noabi::stdx::optional< std::int32_t > & trim_factor() const
Gets RangeOpts.trimFactor.
const bsoncxx::v_noabi::stdx::optional< std::int64_t > & sparsity() const
Gets RangeOpts.sparsity.
range & min(bsoncxx::v_noabi::types::bson_value::view_or_value value)
Sets RangeOpts.min.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & max() const
Gets RangeOpts.max.
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & min() const
Gets RangeOpts.min.
const bsoncxx::v_noabi::stdx::optional< std::int32_t > & precision() const
Gets RangeOpts.precision.
#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::range.
Provides bsoncxx::v_noabi::types::bson_value::view_or_value.
Provides entities used to represent BSON types.