43 static constexpr std::size_t k_oid_length = 12;
120 friend int oid_compare(
const oid& lhs,
const oid& rhs);
122 std::array<char, k_oid_length> _bytes;
The bsoncxx macro guard postlude header.
The bsoncxx macro guard prelude header.
Represents a MongoDB ObjectId. As this BSON type is used within the MongoDB server as a primary key f...
Definition oid.hpp:41
std::string to_string() const
Converts this oid to a hexadecimal string.
friend bool operator==(const oid &lhs, const oid &rhs)
Relational operators for OIDs.
friend bool operator!=(const oid &lhs, const oid &rhs)
Relational operators for OIDs.
static std::size_t size()
Returns the number of bytes in this ObjectId.
Definition oid.hpp:85
const char * bytes() const
An accessor for the internal data buffer in the oid.
std::time_t get_time_t() const
Extracts the timestamp portion of the underlying ObjectId.
friend bool operator<(const oid &lhs, const oid &rhs)
Relational operators for OIDs.
friend bool operator>(const oid &lhs, const oid &rhs)
Relational operators for OIDs.
friend bool operator>=(const oid &lhs, const oid &rhs)
Relational operators for OIDs.
friend bool operator<=(const oid &lhs, const oid &rhs)
Relational operators for OIDs.
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition fwd.hpp:225
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace reserved for the C++ standard library.
Declares bsoncxx::v_noabi::oid.
Provides std::string_view-related polyfills for library API usage.