Representation of Universally Unique Identifier (UUID) data type in Vertica.
More...
|
| VUuid (vuuid_t *data) |
| Create a Universally Unique Identifier type from a vuuid_t array. More...
|
|
| VUuid (const VUuid &other) |
|
int | compare (const VUuid &from) const |
| Compares this VUuid to another. More...
|
|
void | copy (const VUuid &from) |
| Copy data from another VUuid. More...
|
|
bool | equal (const VUuid &from) const |
| Indicates whether another VUuid is equal to this one. More...
|
|
bool | fromCharArray (const char *str) |
| Populate this UUID's data array from a string representation. More...
|
|
bool | fromString (const std::string &str) |
| Populate this UUID's data array from a string representation. More...
|
|
vuuid_t & | getData () |
| Get a reference to the data array.
|
|
const vuuid_t & | getData () const |
| Get a const reference to the data array.
|
|
bool | isNull () const |
| Indicates if this VUuid is the SQL NULL value. More...
|
|
bool | operator< (const VUuid &other) const |
|
bool | operator<= (const VUuid &other) const |
|
VUuid & | operator= (const VUuid &other) |
|
bool | operator== (const VUuid &other) const |
|
bool | operator> (const VUuid &other) const |
|
bool | operator>= (const VUuid &other) const |
|
void | setNull () |
| Sets this VUuid to the SQL NULL value. More...
|
|
void | toCharArray (char *buf, size_t bufLen) const |
| Return a string representation of this UUID. More...
|
|
std::string | toString () const |
| Return a string representation of this UUID. More...
|
|
Representation of Universally Unique Identifier (UUID) data type in Vertica.
Vertica::VUuid::VUuid |
( |
vuuid_t * |
data | ) |
|
|
inline |
Create a Universally Unique Identifier type from a vuuid_t array.
- Note
- It is the callers responsibility to allocate and manage the lifetime of the data array, which is UUID_LEN bytes long.
Example:
vuuid_t data = {
0x06, 0xbe, 0x07, 0x79, 0xc0, 0xb7, 0x46, 0xcb,
0x8a, 0x16, 0x99, 0x09, 0x26, 0x99, 0x9a, 0xfd,
};
VUuid uuid(data);
int Vertica::VUuid::compare |
( |
const VUuid & |
from | ) |
const |
|
inline |
Compares this VUuid to another.
- Parameters
-
from | The VUuid to compare to |
- Returns
- -1 if this < other, 0 if equal, 1 if this > other
- Note
- SQL NULL compares less than anything else; two SQL NULLs are considered equal
Referenced by equal().
void Vertica::VUuid::copy |
( |
const VUuid & |
from | ) |
|
|
inline |
Copy data from another VUuid.
- Parameters
-
bool Vertica::VUuid::equal |
( |
const VUuid & |
from | ) |
const |
|
inline |
Indicates whether another VUuid is equal to this one.
- Parameters
-
other | The VUuid to compare to |
bool Vertica::VUuid::fromCharArray |
( |
const char * |
str | ) |
|
|
inline |
Populate this UUID's data array from a string representation.
- Note
- str should be valid UUID format
- Returns
- true on success
bool Vertica::VUuid::fromString |
( |
const std::string & |
str | ) |
|
|
inline |
Populate this UUID's data array from a string representation.
- Returns
- true on success
bool Vertica::VUuid::isNull |
( |
| ) |
const |
|
inline |
void Vertica::VUuid::setNull |
( |
| ) |
|
|
inline |
void Vertica::VUuid::toCharArray |
( |
char * |
buf, |
|
|
size_t |
bufLen |
|
) |
| const |
|
inline |
Return a string representation of this UUID.
- Parameters
-
Buffer | for result, must be at least UUID_PRINT_LEN bytes |
- Note
- Format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
std::string Vertica::VUuid::toString |
( |
| ) |
const |
|
inline |
Return a string representation of this UUID.
- Note
- Format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx