|
|
| Uuid (std::array< uint8_t, kLength > data) |
| |
|
std::span< const uint8_t > | bytes () const |
| | Get the raw bytes of the UUID.
|
| |
| uint8_t | operator[] (size_t index) const |
| | Access individual bytes of the UUID.
|
| |
| std::string | ToString () const override |
| | Convert the UUID to a string in standard format.
|
| |
|
int64_t | high_bits () const |
| |
|
int64_t | low_bits () const |
| |
|
|
static Uuid | GenerateV4 () |
| | Generate a random UUID (version 4).
|
| |
|
static Uuid | GenerateV7 () |
| | Generate UUID version 7 per RFC 9562, with the current timestamp.
|
| |
| static Uuid | GenerateV7 (uint64_t unix_ts_ms) |
| | Generate UUID version 7 per RFC 9562, with the given timestamp.
|
| |
|
static Result< Uuid > | FromString (std::string_view str) |
| | Create a UUID from a string in standard format.
|
| |
|
static Result< Uuid > | FromBytes (std::span< const uint8_t > bytes) |
| | Create a UUID from a 16-byte array.
|
| |
|
|
static constexpr size_t | kLength = 16 |
| |
|
|
bool | operator== (const Uuid &lhs, const Uuid &rhs) |
| |
◆ GenerateV7()
| Uuid iceberg::Uuid::GenerateV7 |
( |
uint64_t |
unix_ts_ms | ) |
|
|
static |
Generate UUID version 7 per RFC 9562, with the given timestamp.
UUID version 7 consists of a Unix timestamp in milliseconds (48 bits) and 74 random bits, excluding the required version and variant bits.
- Parameters
-
| unix_ts_ms | number of milliseconds since start of the UNIX epoch |
- Note
- unix_ts_ms cannot be negative per RFC.
◆ operator[]()
| uint8_t iceberg::Uuid::operator[] |
( |
size_t |
index | ) |
const |
Access individual bytes of the UUID.
- Parameters
-
| index | The index of the byte to access (0-15). |
- Returns
- The byte at the specified index.
- Exceptions
-
◆ ToString()
| std::string iceberg::Uuid::ToString |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files:
- iceberg/util/uuid.h
- iceberg/util/uuid.cc