uql-orm 0.72.1 → 0.72.2

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 (34) hide show
  1. package/dist/browser/uql-browser.min.js +2 -2
  2. package/dist/browser/uql-browser.min.js.map +3 -3
  3. package/dist/dialect/abstractDialect.d.ts +6 -3
  4. package/dist/dialect/abstractDialect.js +22 -1
  5. package/dist/dialect/abstractSqlDialect.d.ts +7 -6
  6. package/dist/dialect/abstractSqlDialect.js +39 -30
  7. package/dist/dialect/aliases.d.ts +1 -1
  8. package/dist/dialect/aliases.js +1 -1
  9. package/dist/dialect/mysqlLikeSqlDialect.d.ts +2 -2
  10. package/dist/dialect/mysqlLikeSqlDialect.js +4 -5
  11. package/dist/dialect/pgLikeSqlDialect.d.ts +3 -3
  12. package/dist/dialect/pgLikeSqlDialect.js +6 -7
  13. package/dist/dialect/queryJoins.d.ts +11 -1
  14. package/dist/dialect/queryJoins.js +14 -0
  15. package/dist/dialect/vectorSqlDialect.d.ts +0 -5
  16. package/dist/dialect/vectorSqlDialect.js +0 -15
  17. package/dist/migrate/generator/mongoCommand.d.ts +2 -0
  18. package/dist/migrate/generator/mongoSchemaGenerator.js +3 -2
  19. package/dist/migrate/introspection/mongoIntrospector.js +8 -3
  20. package/dist/mongo/mongoDialect.d.ts +15 -2
  21. package/dist/mongo/mongoDialect.js +49 -8
  22. package/dist/mongo/mongodbQuerier.js +6 -7
  23. package/dist/mongo/mongodbQuerierPool.js +4 -1
  24. package/dist/schema/indexDifferences.d.ts +2 -2
  25. package/dist/schema/indexDifferences.js +9 -2
  26. package/dist/sqlite/sqliteDialect.d.ts +4 -4
  27. package/dist/sqlite/sqliteDialect.js +15 -6
  28. package/dist/type/query.d.ts +11 -3
  29. package/dist/type/queryWhere.d.ts +3 -2
  30. package/dist/util/dialect.util.d.ts +6 -1
  31. package/dist/util/dialect.util.js +8 -0
  32. package/dist/util/wideNumber.d.ts +5 -3
  33. package/dist/util/wideNumber.js +8 -4
  34. package/package.json +1 -1
@@ -9,14 +9,18 @@ export function decodeWideNumber(value) {
9
9
  return Math.abs(decoded) <= Number.MAX_SAFE_INTEGER ? decoded : String(value);
10
10
  }
11
11
  /**
12
- * {@link decodeWideNumber} over every `bigint` cell of a row, for the drivers that hand a BIGINT back
13
- * as one (`bun:sql`, `mariadb`, and every SQLite driver but D1). In place: the row is the driver's fresh
14
- * object, and a copy per row cost more than the decode it carried.
12
+ * {@link decodeWideNumber} over every `bigint` cell of a row, for the drivers that hand a BIGINT back as
13
+ * one (`bun:sql`, `mariadb`, and every SQLite driver but D1). In place: the row is the driver's fresh
14
+ * object, and a copy per row cost more than the decode it carried. One argument, so it maps rows as is.
15
15
  */
16
16
  export function decodeBigInts(row) {
17
+ return decodeBigIntsExcept(row, () => false);
18
+ }
19
+ /** {@link decodeBigInts}, keeping the cells `exact` names: what MongoDB reads a `BigInt` field into. */
20
+ export function decodeBigIntsExcept(row, exact) {
17
21
  for (const key in row) {
18
22
  const value = row[key];
19
- if (typeof value === 'bigint') {
23
+ if (typeof value === 'bigint' && !exact(key)) {
20
24
  row[key] = decodeWideNumber(value);
21
25
  }
22
26
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "homepage": "https://uql-orm.dev",
4
4
  "description": "The JSON-native TypeScript ORM for Bun, Browsers, Edge, Deno, Node, Workers. Supports PostgreSQL, PGlite, MySQL, MariaDB, SQLite, CockroachDB, SQL Server, Turso, Neon, Cloudflare D1 and MongoDB. Queries are plain JSON, typed to the leaf.",
5
5
  "license": "MIT",
6
- "version": "0.72.1",
6
+ "version": "0.72.2",
7
7
  "type": "module",
8
8
  "engines": {
9
9
  "node": ">=24"