ClickHouse/dbms/Parsers/queryToString.cpp
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

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();
}
}