diff options
| author | 2016-06-13 18:42:57 -0400 | |
|---|---|---|
| committer | 2016-06-13 18:42:57 -0400 | |
| commit | 65d5f68cc6dc81799c5a5d90400a2c1f0dd02547 (patch) | |
| tree | 6f245ba901b87ef42fed69965aea22f5eea6b590 /Plugins/SqlEnterpriseFormatter/formatexpr.cpp | |
| parent | aeb6bad01630d325a4e768e798a7a6d44e18fdaf (diff) | |
| parent | 5d9314f134ddd3dc4c853e398ac90ba247fb2e4f (diff) | |
Merge tag 'upstream/3.1.0'
Upstream version 3.1.0
# gpg: Signature made Mon 13 Jun 2016 06:42:54 PM EDT 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.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/formatexpr.cpp b/Plugins/SqlEnterpriseFormatter/formatexpr.cpp index ec5d4d6..b1a36b5 100644 --- a/Plugins/SqlEnterpriseFormatter/formatexpr.cpp +++ b/Plugins/SqlEnterpriseFormatter/formatexpr.cpp @@ -51,7 +51,8 @@ void FormatExpr::formatInternal() { // Operator can be a keyword QString opStr = cfg->SqlEnterpriseFormatter.UppercaseKeywords.get() ? expr->unaryOp.toUpper() : expr->unaryOp.toLower(); - withOperator(opStr).withStatement(expr->expr1, "unaryOp"); + withOperator(opStr, FormatToken::Flag::NO_SPACE_BEFORE|FormatToken::Flag::NO_SPACE_AFTER); + withStatement(expr->expr1, "unaryOp"); break; } case SqliteExpr::Mode::BINARY_OP: @@ -76,7 +77,11 @@ void FormatExpr::formatInternal() if (expr->distinctKw) withKeyword("DISTINCT"); - withStatementList(expr->exprList, "funcArgs", FormatStatement::ListSeparator::EXPR_COMMA).withParFuncRight(); + if (expr->star) + withOperator("*").withParFuncRight(); + else + withStatementList(expr->exprList, "funcArgs", FormatStatement::ListSeparator::EXPR_COMMA).withParFuncRight(); + break; } case SqliteExpr::Mode::SUB_EXPR: @@ -157,7 +162,7 @@ void FormatExpr::formatInternal() } else if (expr->exprList.size() > 0) { - withParExprLeft().withStatementList(expr->exprList).withParExprRight(); + withParExprLeft().withStatementList(expr->exprList, FormatToken::Flag::NO_NEWLINE_AFTER).withParExprRight(); } else { |
