mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
23 lines
605 B
C++
23 lines
605 B
C++
#include <DB/Common/Collator.h>
|
|
#include <DB/Parsers/ASTOrderByElement.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void ASTOrderByElement::formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
|
|
{
|
|
children.front()->formatImpl(settings, state, frame);
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "")
|
|
<< (direction == -1 ? " DESC" : " ASC")
|
|
<< (settings.hilite ? hilite_none : "");
|
|
|
|
if (collation)
|
|
{
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << " COLLATE " << (settings.hilite ? hilite_none : "");
|
|
collation->formatImpl(settings, state, frame);
|
|
}
|
|
}
|
|
|
|
}
|