2023-01-31 15:35:10 +00:00
|
|
|
#include <IO/ReadBufferFromString.h>
|
|
|
|
|
|
|
|
#include <Interpreters/Context.h>
|
|
|
|
#include <Interpreters/executeQuery.h>
|
2024-01-09 06:33:48 +00:00
|
|
|
#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
|
|
|
}
|
|
|
|
|
2024-01-09 06:33:48 +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
|
|
|
}
|