Kùzu C++ API
Loading...
Searching...
No Matches
uuid.h
Go to the documentation of this file.
1#pragma once
2
3#include "int128_t.h"
4
5namespace kuzu {
6namespace common {
7
8class RandomEngine;
9
10// Note: uuid_t is a reserved keyword in MSVC, we have to use ku_uuid_t instead.
14
15struct UUID {
16 static constexpr const uint8_t UUID_STRING_LENGTH = 36;
17 static constexpr const char HEX_DIGITS[] = "0123456789abcdef";
18 static void byteToHex(char byteVal, char* buf, uint64_t& pos);
19 static unsigned char hex2Char(char ch);
20 static bool isHex(char ch);
21 static bool fromString(std::string str, int128_t& result);
22
23 static int128_t fromString(std::string str);
24 static int128_t fromCString(const char* str, uint64_t len);
25 static void toString(int128_t input, char* buf);
26 static std::string toString(int128_t input);
27 static std::string toString(ku_uuid_t val);
28
29 static ku_uuid_t generateRandomUUID(RandomEngine* engine);
30};
31
32} // namespace common
33} // namespace kuzu
Definition alter_type.h:5
Definition uuid.h:15
static constexpr const char HEX_DIGITS[]
Definition uuid.h:17
static unsigned char hex2Char(char ch)
static void byteToHex(char byteVal, char *buf, uint64_t &pos)
static int128_t fromString(std::string str)
static int128_t fromCString(const char *str, uint64_t len)
static bool isHex(char ch)
static void toString(int128_t input, char *buf)
static std::string toString(ku_uuid_t val)
static std::string toString(int128_t input)
static constexpr const uint8_t UUID_STRING_LENGTH
Definition uuid.h:16
static ku_uuid_t generateRandomUUID(RandomEngine *engine)
static bool fromString(std::string str, int128_t &result)
Definition int128_t.h:20
Definition uuid.h:11
int128_t value
Definition uuid.h:12