mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 08:52:06 +00:00
22 lines
418 B
C++
22 lines
418 B
C++
#include <Parsers/formatAST.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void formatAST(const IAST & ast, WriteBuffer & buf, bool hilite, bool one_line, bool show_secrets)
|
|
{
|
|
IAST::FormatSettings settings(buf, one_line, hilite);
|
|
settings.show_secrets = show_secrets;
|
|
ast.format(settings);
|
|
}
|
|
|
|
String serializeAST(const IAST & ast)
|
|
{
|
|
WriteBufferFromOwnString buf;
|
|
formatAST(ast, buf, false, true);
|
|
return buf.str();
|
|
}
|
|
|
|
}
|