rado 0.2.42 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/Formatter.js +2 -2
- package/package.json +1 -1
package/dist/lib/Formatter.js
CHANGED
|
@@ -438,7 +438,7 @@ class Formatter {
|
|
|
438
438
|
}
|
|
439
439
|
formatGroupBy(ctx, groupBy) {
|
|
440
440
|
const { stmt } = ctx;
|
|
441
|
-
if (!groupBy)
|
|
441
|
+
if (!groupBy || groupBy.length === 0)
|
|
442
442
|
return stmt;
|
|
443
443
|
stmt.addLine("GROUP BY").space();
|
|
444
444
|
for (const expr of stmt.separate(groupBy))
|
|
@@ -447,7 +447,7 @@ class Formatter {
|
|
|
447
447
|
}
|
|
448
448
|
formatOrderBy(ctx, orderBy) {
|
|
449
449
|
const { stmt } = ctx;
|
|
450
|
-
if (!orderBy)
|
|
450
|
+
if (!orderBy || orderBy.length === 0)
|
|
451
451
|
return stmt;
|
|
452
452
|
stmt.addLine("ORDER BY").space();
|
|
453
453
|
for (const { expr, order } of stmt.separate(orderBy)) {
|