2011-09-04 05:14:52 +00:00
|
|
|
|
#pragma once
|
2010-06-28 13:44:42 +00:00
|
|
|
|
|
|
|
|
|
#include <ostream>
|
|
|
|
|
|
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
|
#include <DB/Parsers/ASTSelectQuery.h>
|
2011-08-18 18:48:00 +00:00
|
|
|
|
#include <DB/Parsers/ASTCreateQuery.h>
|
2010-06-28 13:44:42 +00:00
|
|
|
|
#include <DB/Parsers/ASTExpressionList.h>
|
|
|
|
|
#include <DB/Parsers/ASTFunction.h>
|
|
|
|
|
#include <DB/Parsers/ASTIdentifier.h>
|
|
|
|
|
#include <DB/Parsers/ASTLiteral.h>
|
2011-08-18 18:48:00 +00:00
|
|
|
|
#include <DB/Parsers/ASTNameTypePair.h>
|
2011-08-28 08:50:27 +00:00
|
|
|
|
#include <DB/Parsers/ASTAsterisk.h>
|
2011-09-04 05:14:52 +00:00
|
|
|
|
#include <DB/Parsers/ASTOrderByElement.h>
|
2010-06-28 13:44:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/** Берёт синтаксическое дерево и превращает его обратно в текст.
|
|
|
|
|
*/
|
|
|
|
|
void formatAST(const IAST & ast, std::ostream & s);
|
|
|
|
|
|
|
|
|
|
void formatAST(const ASTSelectQuery & ast, std::ostream & s);
|
2011-08-18 18:48:00 +00:00
|
|
|
|
void formatAST(const ASTCreateQuery & ast, std::ostream & s);
|
2010-06-28 13:44:42 +00:00
|
|
|
|
void formatAST(const ASTExpressionList & ast, std::ostream & s);
|
|
|
|
|
void formatAST(const ASTFunction & ast, std::ostream & s);
|
|
|
|
|
void formatAST(const ASTIdentifier & ast, std::ostream & s);
|
|
|
|
|
void formatAST(const ASTLiteral & ast, std::ostream & s);
|
2011-08-18 18:48:00 +00:00
|
|
|
|
void formatAST(const ASTNameTypePair & ast, std::ostream & s);
|
2011-08-28 08:50:27 +00:00
|
|
|
|
void formatAST(const ASTAsterisk & ast, std::ostream & s);
|
2011-09-04 05:14:52 +00:00
|
|
|
|
void formatAST(const ASTOrderByElement & ast, std::ostream & s);
|
2010-06-28 13:44:42 +00:00
|
|
|
|
|
|
|
|
|
}
|