blob: b70e0ab48f3d894e7985b945e59f3b94dceee1d9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "formatorderby.h"
#include "parser/ast/sqliteorderby.h"
#include "parser/ast/sqliteexpr.h"
FormatOrderBy::FormatOrderBy(SqliteOrderBy* orderBy) :
orderBy(orderBy)
{
}
void FormatOrderBy::formatInternal()
{
withStatement(orderBy->expr);
if (orderBy->order != SqliteSortOrder::null)
withKeyword(sqliteSortOrder(orderBy->order));
if (orderBy->nulls != SqliteNulls::null)
withKeyword("NULLS").withKeyword(sqliteNulls(orderBy->nulls));
}
|