Vertica::VUuid Class Reference
Representation of Universally Unique Identifier (UUID) data type in Vertica.
Collaboration diagram for Vertica::VUuid:
| Public Member Functions | |
|---|---|
| VUuid (vuuid_t *data) | |
| Create a Universally Unique Identifier type from a vuuid_t array. | |
| VUuid (const VUuid &other) | |
| int | compare (const VUuid &from) const |
| Compares this VUuid to another. | |
| void | copy (const VUuid &from) |
| Copy data from another VUuid. | |
| bool | equal (const VUuid &from) const |
| Indicates whether another VUuid is equal to this one. | |
| bool | fromCharArray (const char *str) |
| Populate this UUID's data array from a string representation. | |
| bool | fromString (const std::string &str) |
| Populate this UUID's data array from a string representation. | |
| 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. | |
| bool | operator (const VUuid &other) const |
| bool | operator>= (const VUuid &other) const |
| void | setNull () |
| Sets this VUuid to the SQL NULL value. | |
| void | toCharArray (char *buf, size_t bufLen) const |
| Return a string representation of this UUID. | |
| std::string | toString () const |
| Return a string representation of this UUID. |
Detailed Description
Representation of Universally Unique Identifier (UUID) data type in Vertica.
Constructor & Destructor Documentation
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);
Member Function Documentation
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
from: The source VUuid
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 Indicates if this VUuid is the SQL NULL value.
Note NULL is the UUID NIL value 00000000-0000-0000-0000-000000000000
Referenced by Vertica::BlockReader::isNull().
void Vertica::VUuid::setNull()
inline Sets this VUuid to the SQL NULL value.
Note NULL is the UUID NIL value 00000000-0000-0000-0000-000000000000
Referenced by
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