mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
19 lines
360 B
C++
19 lines
360 B
C++
#include <Parsers/queryToString.h>
|
|
#include <Parsers/formatAST.h>
|
|
#include <sstream>
|
|
|
|
namespace DB
|
|
{
|
|
String queryToString(const ASTPtr & query)
|
|
{
|
|
return queryToString(*query);
|
|
}
|
|
|
|
String queryToString(const IAST & query)
|
|
{
|
|
std::ostringstream out;
|
|
formatAST(query, out, false, true);
|
|
return out.str();
|
|
}
|
|
}
|