@housekit/orm 0.1.44 → 0.1.45

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2354,6 +2354,11 @@ class QueryCompiler {
2354
2354
  Object.assign(params, res.params);
2355
2355
  colSql = res.sql;
2356
2356
  }
2357
+ const sqlUpper = colSql.trim().toUpperCase();
2358
+ const alreadyHasDirection = sqlUpper.endsWith(" ASC") || sqlUpper.endsWith(" DESC");
2359
+ if (alreadyHasDirection) {
2360
+ return colSql;
2361
+ }
2357
2362
  return `${colSql} ${o.dir}`;
2358
2363
  });
2359
2364
  orderSql = `ORDER BY ${parts.join(", ")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@housekit/orm",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "Type-safe ClickHouse ORM with modern DX and ClickHouse-specific optimizations. Features optimized JSONCompact streaming, full engine support, and advanced query capabilities.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",