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.
@@ -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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rado",
3
- "version": "0.2.42",
3
+ "version": "0.2.43",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",