ClickHouse/src/Interpreters/InterpreterSetQuery.cpp

26 lines
602 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 &>();
getContext()->checkSettingsConstraints(ast.changes);
getContext()->getSessionContext()->applySettingsChanges(ast.changes);
return {};
2016-12-12 07:24:56 +00:00
}
void InterpreterSetQuery::executeForCurrentContext()
{
const auto & ast = query_ptr->as<ASTSetQuery &>();
getContext()->checkSettingsConstraints(ast.changes);
getContext()->applySettingsChanges(ast.changes);
2016-12-12 07:24:56 +00:00
}
}