@kequtech/tenon-orm 0.4.5 → 0.4.7

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.
@@ -272,3 +272,27 @@ It does not check query annotations, pending migrations, functions, privileges,
272
272
  object. A driver or generator update can change output without schema drift. Review generated diffs
273
273
  after upgrades. Generated text and schema-summary formatting are not version-stable schema
274
274
  fingerprints; see [baseline verification](adoption-guide.md#check-and-adopt-an-existing-database).
275
+
276
+ ### UUID array parameters
277
+
278
+ `builtin.uuidArray` encodes a UUID array parameter with PostgreSQL's UUID-array OID. For a UUID
279
+ `id` column:
280
+
281
+ ```ts
282
+ import { builtin, param, sql } from '@kequtech/tenon-orm';
283
+
284
+ const ids = ['123e4567-e89b-42d3-a456-426614174000'];
285
+ const query = sql`SELECT id FROM public.users WHERE id = ANY(${param(ids, builtin.uuidArray)})`;
286
+ ```
287
+
288
+ PostgreSQL validates UUID syntax; the codec uses the existing recursive string-array encoding rules,
289
+ including empty arrays and SQL NULL elements. This additive helper does not change default decoding.
290
+ The existing `param(ids, builtin.textArray)::uuid[]` form remains valid.
291
+
292
+ ### Decode error context
293
+
294
+ `PGCLEAR_DECODE` errors expose `column` and `dataTypeOid` when the failing output field is known.
295
+ These identify the field without adding row values, SQL, or parameters to the error context. The
296
+ original decoder error remains available through `cause`; application-defined causes retain their
297
+ own content. Date/infinity failures still propagate and should retain the application's existing
298
+ fail-closed expiry checks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kequtech/tenon-orm",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "description": "A PostgreSQL ORM designed for coding agents, with explicit SQL, typed queries, and migrations",
@@ -71,7 +71,7 @@
71
71
  "printWidth": 100
72
72
  },
73
73
  "dependencies": {
74
- "@kequtech/pgclear": "^0.3.3",
74
+ "@kequtech/pgclear": "^0.3.4",
75
75
  "typescript": "~6.0.2"
76
76
  }
77
77
  }