1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/parser/statement/set_statement.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/common/enums/set_scope.hpp"
12#include "duckdb/common/enums/set_type.hpp"
13#include "duckdb/parser/sql_statement.hpp"
14#include "duckdb/common/types/value.hpp"
15
16namespace duckdb {
17
18class SetStatement : public SQLStatement {
19public:
20 static constexpr const StatementType TYPE = StatementType::SET_STATEMENT;
21
22protected:
23 SetStatement(std::string name_p, SetScope scope_p, SetType type_p);
24 SetStatement(const SetStatement &other) = default;
25
26public:
27 unique_ptr<SQLStatement> Copy() const override;
28
29public:
30 std::string name;
31 SetScope scope;
32 SetType set_type;
33};
34
35class SetVariableStatement : public SetStatement {
36public:
37 SetVariableStatement(std::string name_p, Value value_p, SetScope scope_p);
38
39protected:
40 SetVariableStatement(const SetVariableStatement &other) = default;
41
42public:
43 unique_ptr<SQLStatement> Copy() const override;
44
45public:
46 Value value;
47};
48
49class ResetVariableStatement : public SetStatement {
50public:
51 ResetVariableStatement(std::string name_p, SetScope scope_p);
52
53protected:
54 ResetVariableStatement(const ResetVariableStatement &other) = default;
55};
56
57} // namespace duckdb
58