mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 19:14:30 +00:00
15 lines
211 B
C++
15 lines
211 B
C++
#pragma once
|
|
|
|
#include <DB/Parsers/formatAST.h>
|
|
|
|
namespace DB
|
|
{
|
|
inline std::string queryToString(const ASTPtr & query)
|
|
{
|
|
std::ostringstream s;
|
|
formatAST(*query, s, 0, false, true);
|
|
|
|
return s.str();
|
|
}
|
|
}
|