ClickHouse/dbms/Interpreters/InterpreterSetQuery.cpp

26 lines
577 B
C++
Raw Normal View History

#include <Parsers/ASTSetQuery.h>
2017-05-23 18:24:43 +00:00
#include <Interpreters/Context.h>
#include <Interpreters/InterpreterSetQuery.h>
2016-12-12 07:24:56 +00:00
namespace DB
{
BlockIO InterpreterSetQuery::execute()
{
const auto & ast = query_ptr->as<ASTSetQuery &>();
context.checkSettingsConstraints(ast.changes);
context.getSessionContext().applySettingsChanges(ast.changes);
return {};
2016-12-12 07:24:56 +00:00
}
void InterpreterSetQuery::executeForCurrentContext()
{
const auto & ast = query_ptr->as<ASTSetQuery &>();
context.checkSettingsConstraints(ast.changes);
context.applySettingsChanges(ast.changes);
2016-12-12 07:24:56 +00:00
}
}