@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.
- package/CHANGELOG.md +28 -0
- package/README.md +2 -1
- package/dist/check/contracts.d.ts +2 -2
- package/dist/check/contracts.js +12 -28
- package/dist/check/output.d.ts +3 -0
- package/dist/check/output.js +31 -0
- package/dist/check/source.d.ts +2 -2
- package/dist/check/source.js +105 -63
- package/dist/check/types.d.ts +7 -0
- package/dist/check.d.ts +1 -1
- package/dist/check.js +21 -3
- package/dist/cli.js +24 -10
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/inspection/catalog.d.ts +1 -0
- package/dist/inspection/catalog.js +5 -1
- package/dist/inspection/result.js +12 -2
- package/dist/inspection/types.d.ts +2 -0
- package/dist/migrations/connection.js +2 -2
- package/dist/schema/catalog.d.ts +4 -0
- package/dist/schema/catalog.js +69 -0
- package/dist/schema/types.d.ts +70 -0
- package/dist/schema/types.js +1 -0
- package/dist/schema.d.ts +4 -0
- package/dist/schema.js +47 -0
- package/docs/adoption-guide.md +4 -1
- package/docs/configuration.md +2 -1
- package/docs/connections.md +45 -1
- package/docs/query-checking.md +64 -19
- package/docs/query-inspection.md +9 -0
- package/docs/reference.md +6 -2
- package/docs/schema-inspection.md +94 -0
- package/docs/schema-types.md +24 -0
- package/package.json +2 -2
package/docs/schema-types.md
CHANGED
|
@@ -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.
|
|
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.
|
|
74
|
+
"@kequtech/pgclear": "^0.3.4",
|
|
75
75
|
"typescript": "~6.0.2"
|
|
76
76
|
}
|
|
77
77
|
}
|