aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatexpr.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-02-22 14:06:38 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-02-22 14:06:38 -0500
commit6d42c08a54f15ddfdd8ee73643e3ddf8907bccc2 (patch)
tree0a6554677b6a7fea5c81134c0804f0acdb00e632 /Plugins/SqlEnterpriseFormatter/formatexpr.cpp
parenta0cf2bb71de2b70a2b293c4ce907ecaaf24275bf (diff)
parent306d6d3ca9c9ad774d19135681a7f9805f77035f (diff)
Merge tag 'upstream/3.0.3'
Upstream version 3.0.3 # gpg: Signature made Sun 22 Feb 2015 02:06:37 PM EST using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
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;