1 | #include <Parsers/ASTSetQuery.h> |
---|---|
2 | #include <Interpreters/Context.h> |
3 | #include <Interpreters/InterpreterSetQuery.h> |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | |
9 | BlockIO InterpreterSetQuery::execute() |
10 | { |
11 | const auto & ast = query_ptr->as<ASTSetQuery &>(); |
12 | context.checkSettingsConstraints(ast.changes); |
13 | context.getSessionContext().applySettingsChanges(ast.changes); |
14 | return {}; |
15 | } |
16 | |
17 | |
18 | void InterpreterSetQuery::executeForCurrentContext() |
19 | { |
20 | const auto & ast = query_ptr->as<ASTSetQuery &>(); |
21 | context.checkSettingsConstraints(ast.changes); |
22 | context.applySettingsChanges(ast.changes); |
23 | } |
24 | |
25 | } |
26 |