Kùzu C++ API
Loading...
Searching...
No Matches
statement.h
Go to the documentation of this file.
1#pragma once
2
3#include "cast.h"
4#include "statement_type.h"
5
6namespace kuzu {
7namespace parser {
8
9class Statement {
10public:
11 explicit Statement(common::StatementType statementType) : statementType{statementType} {}
12
13 virtual ~Statement() = default;
14
15 common::StatementType getStatementType() const { return statementType; }
16
17 bool requireTx() {
18 switch (statementType) {
20 return false;
21 default:
22 return true;
23 }
24 }
25
26 template<class TARGET>
27 TARGET& cast() {
29 }
30 template<class TARGET>
31 const TARGET& constCast() const {
33 }
34 template<class TARGET>
35 const TARGET* constPtrCast() const {
37 }
38
39private:
40 common::StatementType statementType;
41};
42
43} // namespace parser
44} // namespace kuzu
Definition statement.h:9
virtual ~Statement()=default
const TARGET * constPtrCast() const
Definition statement.h:35
const TARGET & constCast() const
Definition statement.h:31
bool requireTx()
Definition statement.h:17
common::StatementType getStatementType() const
Definition statement.h:15
TARGET & cast()
Definition statement.h:27
Statement(common::StatementType statementType)
Definition statement.h:11
TO ku_dynamic_cast(FROM old)
Definition cast.h:11
StatementType
Definition statement_type.h:8
Definition alter_type.h:5