mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
15 lines
269 B
C++
15 lines
269 B
C++
#include <Parsers/queryToString.h>
|
|
#include <Parsers/formatAST.h>
|
|
#include <sstream>
|
|
|
|
namespace DB
|
|
{
|
|
String queryToString(const ASTPtr & query)
|
|
{
|
|
std::ostringstream out;
|
|
formatAST(*query, out, 0, false, true);
|
|
|
|
return out.str();
|
|
}
|
|
}
|