aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatexpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter/formatexpr.cpp')
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatexpr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/formatexpr.cpp b/Plugins/SqlEnterpriseFormatter/formatexpr.cpp
index 2099126..da51ae6 100644
--- a/Plugins/SqlEnterpriseFormatter/formatexpr.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatexpr.cpp
@@ -71,8 +71,14 @@ void FormatExpr::formatInternal()
break;
}
case SqliteExpr::Mode::FUNCTION:
- withFuncId(expr->function).withParFuncLeft().withStatementList(expr->exprList, "funcArgs", FormatStatement::ListSeparator::EXPR_COMMA).withParFuncRight();
+ {
+ withFuncId(expr->function).withParFuncLeft();
+ if (expr->distinctKw)
+ withKeyword("DISTINCT");
+
+ withStatementList(expr->exprList, "funcArgs", FormatStatement::ListSeparator::EXPR_COMMA).withParFuncRight();
break;
+ }
case SqliteExpr::Mode::SUB_EXPR:
withParExprLeft().withStatement(expr->expr1).withParExprRight();
break;