mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
26 lines
602 B
C++
26 lines
602 B
C++
#include <Parsers/ASTSetQuery.h>
|
|
#include <Interpreters/Context.h>
|
|
#include <Interpreters/InterpreterSetQuery.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
BlockIO InterpreterSetQuery::execute()
|
|
{
|
|
const auto & ast = query_ptr->as<ASTSetQuery &>();
|
|
getContext()->checkSettingsConstraints(ast.changes);
|
|
getContext()->getSessionContext()->applySettingsChanges(ast.changes);
|
|
return {};
|
|
}
|
|
|
|
|
|
void InterpreterSetQuery::executeForCurrentContext()
|
|
{
|
|
const auto & ast = query_ptr->as<ASTSetQuery &>();
|
|
getContext()->checkSettingsConstraints(ast.changes);
|
|
getContext()->applySettingsChanges(ast.changes);
|
|
}
|
|
|
|
}
|