Kùzu C++ API
Loading...
Searching...
No Matches
rdf_variant.h
Go to the documentation of this file.
1#pragma once
2
3#include "api.h"
4#include "blob.h"
5#include "nested.h"
6#include "value.h"
7
8namespace kuzu {
9namespace common {
10class Value;
12public:
18 KUZU_API static LogicalTypeID getLogicalTypeID(const Value* rdfVariant);
19
26 template<typename T>
27 T static getValue(const Value* rdfVariant) {
28 auto blobData = NestedVal::getChildVal(rdfVariant, 1)->strVal.data();
29 return Blob::getValue<T>(blobData);
30 }
31};
32
38template<>
39KUZU_API inline std::string RdfVariant::getValue<std::string>(const Value* rdfVariant) {
40 return NestedVal::getChildVal(rdfVariant, 1)->strVal;
41}
42} // namespace common
43} // namespace kuzu
#define KUZU_API
Definition api.h:25
static KUZU_API Value * getChildVal(const Value *val, uint32_t idx)
Definition rdf_variant.h:11
static T getValue(const Value *rdfVariant)
Get the value of the rdf variant.
Definition rdf_variant.h:27
static KUZU_API LogicalTypeID getLogicalTypeID(const Value *rdfVariant)
Get the logical type id of the rdf variant.
Definition value.h:27
std::string strVal
Definition value.h:288
LogicalTypeID
Definition types.h:126
Definition alter_type.h:5
static T getValue(const blob_t &data)
Definition blob.h:38