Kuzu C++ API
Loading...
Searching...
No Matches
expression_type.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string>
5
6#include "api.h"
7
8namespace kuzu {
9namespace common {
10
11enum class ExpressionType : uint8_t {
12 // Boolean Connection Expressions
13 OR = 0,
14 XOR = 1,
15 AND = 2,
16 NOT = 3,
17
18 // Comparison Expressions
19 EQUALS = 10,
25
26 // Null Operator Expressions
27 IS_NULL = 50,
29
31
32 LITERAL = 70,
33
34 STAR = 80,
35
37 PATH = 91,
38 PATTERN = 92, // Node & Rel pattern
39
40 PARAMETER = 100,
41
42 // At parsing stage, both aggregate and scalar functions have type FUNCTION.
43 // After binding, only scalar function have type FUNCTION.
44 FUNCTION = 110,
45
47
48 SUBQUERY = 190,
49
50 CASE_ELSE = 200,
51
52 GRAPH = 210,
53
54 LAMBDA = 220,
55
56 // NOTE: this enum has type uint8_t so don't assign over 255.
57 INVALID = 255,
58};
59
61 static bool isUnary(ExpressionType type);
62 static bool isBinary(ExpressionType type);
63 static bool isBoolean(ExpressionType type);
64 static bool isComparison(ExpressionType type);
65 static bool isNullOperator(ExpressionType type);
66
68
69 static KUZU_API std::string toString(ExpressionType type);
70 static std::string toParsableString(ExpressionType type);
71};
72
73} // namespace common
74} // namespace kuzu
#define KUZU_API
Definition api.h:25
Definition array_utils.h:7
ExpressionType
Definition expression_type.h:11
@ PATTERN
Definition expression_type.h:38
@ IS_NOT_NULL
Definition expression_type.h:28
@ NOT
Definition expression_type.h:16
@ GREATER_THAN
Definition expression_type.h:21
@ CASE_ELSE
Definition expression_type.h:50
@ OR
Definition expression_type.h:13
@ GREATER_THAN_EQUALS
Definition expression_type.h:22
@ AND
Definition expression_type.h:15
@ PATH
Definition expression_type.h:37
@ LAMBDA
Definition expression_type.h:54
@ EQUALS
Definition expression_type.h:19
@ FUNCTION
Definition expression_type.h:44
@ PROPERTY
Definition expression_type.h:30
@ STAR
Definition expression_type.h:34
@ XOR
Definition expression_type.h:14
@ AGGREGATE_FUNCTION
Definition expression_type.h:46
@ LITERAL
Definition expression_type.h:32
@ LESS_THAN
Definition expression_type.h:23
@ LESS_THAN_EQUALS
Definition expression_type.h:24
@ PARAMETER
Definition expression_type.h:40
@ INVALID
Definition expression_type.h:57
@ NOT_EQUALS
Definition expression_type.h:20
@ IS_NULL
Definition expression_type.h:27
@ GRAPH
Definition expression_type.h:52
@ VARIABLE
Definition expression_type.h:36
@ SUBQUERY
Definition expression_type.h:48
Definition array_utils.h:7
Definition expression_type.h:60
static bool isBoolean(ExpressionType type)
static bool isBinary(ExpressionType type)
static bool isUnary(ExpressionType type)
static bool isComparison(ExpressionType type)
static std::string toParsableString(ExpressionType type)
static KUZU_API std::string toString(ExpressionType type)
static ExpressionType reverseComparisonDirection(ExpressionType type)
static bool isNullOperator(ExpressionType type)