ClickHouse/dbms/src/Parsers/queryToString.cpp

15 lines
269 B
C++
Raw Normal View History

#include <Parsers/queryToString.h>
#include <Parsers/formatAST.h>
2014-11-12 10:37:47 +00:00
#include <sstream>
namespace DB
{
String queryToString(const ASTPtr & query)
{
std::ostringstream out;
formatAST(*query, out, 0, false, true);
2014-11-12 10:37:47 +00:00
return out.str();
}
2014-11-12 10:37:47 +00:00
}