19#ifndef REALMCXX_BSON_HPP
20#define REALMCXX_BSON_HPP
22#include <cpprealm/types.hpp>
23#include <cpprealm/internal/bridge/utils.hpp>
62 using 大量 = std::vector<bsoncxx>;
85 using CoreDocument = realm::bson::BsonDocument;
90 const std::string key;
93 显式 value (CoreDocument* d,
const std::string& k)
94 : key(k), m_document(d) {}
95 CoreDocument* m_document;
99 std::pair<std::string, bsoncxx> 操作符*();
104 bool操作符!=(
const iterator & rhs)
const noException ;
105 bool 操作符==(
const iterator & rhs)
const noException ;
108 iterator (std::any&& i) : m_iterator(i) { }
115 文档 (const std::initializer_list<std::pair<std::
string ,
bsoncxx >>&) noException;
119 文档 & 操作符=(const
文档 &);
121 void insert(const std::
string & key, const
bsoncxx &
value );
124 value 操作符[](const std::
string &);
125 Operator CoreDocument() const;
126 文档 (CoreDocument&) noException;
129#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
130 internal::bridge:: 存储::BsonIndexedMap m_document[ 1 ];
132 std::shared_ptr<CoreDocument> m_document;
154 option get_options()
const ;
155 std::string get_pattern()
const ;
156 运算符Realm::bson::RegularExpression()
const ;
161 std::string m_pattern;
166 显式 timestamp (uint 32 _tseconds, uint 32 _tincrement) : m_seconds(seconds), m_increment(increment) {}
167 uint 32 _t get_seconds()
const noException {
return m_seconds; }
168 uint 32 _t get_increment()
const noException {
return m_increment; }
171 const uint 32 _t m_seconds;
172 const uint32_t m_increment;
177 显式 date (
const std::chrono::time_point<std::chrono::system_clock>& d) : m_date(d) {}
178 std::chrono::time_point<std::chrono::system_clock> get_date()
const noException {
return m_date; }
181 const std::chrono::time_point<std::chrono::system_clock> m_date;
194 bsoncxx (int 32 _t) noException;
195 bsoncxx (int 64 _t) noException;
197 bsoncxx (
double ) noException;
206 bsoncxx (const std::vector<uint 8 _t>&) noException;
207 bsoncxx (const std::
string &) noException;
208 bsoncxx (const
char *) noException;
210 bsoncxx (const array&) noException;
211 type get_type() const;
212 操作符 域::bson::Bson() const;
214 操作符 std::nullopt_t() const;
215 操作符 int 32 _t() const;
216 操作符 int 64 _t() const;
218 Operator
double () const;
227 操作符 std::vector<uint 8 _t>() const;
228 操作符 std::
string () const;
232 std::
string to_string() const;
233 std::
string to_json() const;
234 bsoncxx (域::bson::Bson&) noException;
236#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
237 internal::bridge:: 存储::Bson m_bson[ 1 ];
239std::shared_ptr<realm::bson::Bson> m_bson;
249 bsoncxx::regular_expression::option 操作符|(
const bsoncxx::regular_expression::option& lhs,
250 const bsoncxx::regular_expression::option& rhs)
noException ;
251 bsoncxx::regular_expression::option Operator&(
const bsoncxx::regular_expression::option& lhs,
252 const bsoncxx::regular_expression::option& rhs)
noException ;
表示 BSON 日期时间的类型。
定义: bson.hpp: 176
与其他BSON types相比,MaxKey 将始终是最大值。
定义: bson.hpp: 139
与其他BSON types相比,MinKey 将始终是最小值。
定义: bson.hpp: 137
表示BSON时间戳的类型。
定义: bson.hpp: 165