ClickHouse/src/Interpreters/InterpreterShowEngineQuery.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
773 B
C++
Raw Normal View History

2023-01-31 15:35:10 +00:00
#include <IO/ReadBufferFromString.h>
#include <Interpreters/Context.h>
#include <Interpreters/executeQuery.h>
#include <Interpreters/InterpreterFactory.h>
2023-01-31 15:35:10 +00:00
#include <Interpreters/InterpreterShowEngineQuery.h>
#include <Parsers/ASTQueryWithOutput.h>
namespace DB
{
BlockIO InterpreterShowEnginesQuery::execute()
{
2023-11-09 15:03:51 +00:00
return executeQuery("SELECT * FROM system.table_engines ORDER BY name", getContext(), QueryFlags{ .internal = true }).second;
2023-01-31 15:35:10 +00:00
}
void registerInterpreterShowEnginesQuery(InterpreterFactory & factory)
{
auto create_fn = [] (const InterpreterFactory::Arguments & args)
{
return std::make_unique<InterpreterShowEnginesQuery>(args.query, args.context);
};
factory.registerInterpreter("InterpreterShowEnginesQuery", create_fn);
}
2023-01-31 15:35:10 +00:00
}