1#include <Parsers/queryToString.h>
2#include <Parsers/formatAST.h>
3#include <sstream>
4
5namespace DB
6{
7 String queryToString(const ASTPtr & query)
8 {
9 return queryToString(*query);
10 }
11
12 String queryToString(const IAST & query)
13 {
14 std::ostringstream out;
15 formatAST(query, out, false, true);
16 return out.str();
17 }
18}
19