Kùzu C++ API
Loading...
Searching...
No Matches
rel.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5#include <string>
6#include <utility>
7#include <vector>
8
9#include "api.h"
10
11namespace kuzu {
12namespace common {
13
14class Value;
15
20class RelVal {
21public:
27 KUZU_API static std::vector<std::pair<std::string, std::unique_ptr<Value>>> getProperties(
28 const Value* val);
32 KUZU_API static uint64_t getNumProperties(const Value* val);
36 KUZU_API static std::string getPropertyName(const Value* val, uint64_t index);
40 KUZU_API static Value* getPropertyVal(const Value* val, uint64_t index);
44 KUZU_API static Value* getSrcNodeIDVal(const Value* val);
48 KUZU_API static Value* getDstNodeIDVal(const Value* val);
52 KUZU_API static Value* getIDVal(const Value* val);
56 KUZU_API static Value* getLabelVal(const Value* val);
60 KUZU_API static std::string toString(const Value* val);
61
62private:
63 static void throwIfNotRel(const Value* val);
64 // 4 offset for id, label, src, dst.
65 static constexpr uint64_t OFFSET = 4;
66};
67
68} // namespace common
69} // namespace kuzu
#define KUZU_API
Definition api.h:25
RelVal represents a rel in the graph and stores the relID, src/dst nodes and properties of that rel.
Definition rel.h:20
static KUZU_API Value * getIDVal(const Value *val)
static KUZU_API std::string getPropertyName(const Value *val, uint64_t index)
static KUZU_API std::vector< std::pair< std::string, std::unique_ptr< Value > > > getProperties(const Value *val)
static KUZU_API std::string toString(const Value *val)
static KUZU_API Value * getLabelVal(const Value *val)
static KUZU_API Value * getDstNodeIDVal(const Value *val)
static KUZU_API Value * getPropertyVal(const Value *val, uint64_t index)
static KUZU_API Value * getSrcNodeIDVal(const Value *val)
static KUZU_API uint64_t getNumProperties(const Value *val)
Definition value.h:27
Definition alter_type.h:5