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 {
6
7namespace regex {
8class RE2;
9}
10
11namespace common {
12
13class RandomEngine;
14
15// Note: uuid_t is a reserved keyword in MSVC, we have to use ku_uuid_t instead.
19
20struct UUID {
21 static constexpr const uint8_t UUID_STRING_LENGTH = 36;
22 static constexpr const char HEX_DIGITS[] = "0123456789abcdef";
23 static void byteToHex(char byteVal, char* buf, uint64_t& pos);
24 static unsigned char hex2Char(char ch);
25 static bool isHex(char ch);
26 static bool fromString(std::string str, int128_t& result);
27
28 static int128_t fromString(std::string str);
29 static int128_t fromCString(const char* str, uint64_t len);
30 static void toString(int128_t input, char* buf);
31 static std::string toString(int128_t input);
32 static std::string toString(ku_uuid_t val);
33
34 static ku_uuid_t generateRandomUUID(RandomEngine* engine);
35
36 static const regex::RE2& regexPattern();
37};
38
39} // namespace common
40} // namespace kuzu
Definition array_utils.h:7
Definition uuid.h:20
static constexpr const char HEX_DIGITS[]
Definition uuid.h:22
static unsigned char hex2Char(char ch)
static const regex::RE2 & regexPattern()
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:21
static ku_uuid_t generateRandomUUID(RandomEngine *engine)
static bool fromString(std::string str, int128_t &result)
Definition int128_t.h:20
Definition uuid.h:16
int128_t value
Definition uuid.h:17