@prisma/orm-postgres 8.0.0-rc.17-dev.13 → 8.0.0-rc.17-dev.14
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-postgres",
|
|
3
|
-
"version": "8.0.0-rc.17-dev.
|
|
3
|
+
"version": "8.0.0-rc.17-dev.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"skills"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@prisma/orm-family-sql": "8.0.0-rc.17-dev.
|
|
14
|
-
"@prisma/orm-framework": "8.0.0-rc.17-dev.
|
|
15
|
-
"@prisma/orm-target-postgres": "8.0.0-rc.17-dev.
|
|
16
|
-
"@prisma/orm-toolchain": "8.0.0-rc.17-dev.
|
|
13
|
+
"@prisma/orm-family-sql": "8.0.0-rc.17-dev.14",
|
|
14
|
+
"@prisma/orm-framework": "8.0.0-rc.17-dev.14",
|
|
15
|
+
"@prisma/orm-target-postgres": "8.0.0-rc.17-dev.14",
|
|
16
|
+
"@prisma/orm-toolchain": "8.0.0-rc.17-dev.14",
|
|
17
17
|
"@types/node": "26.1.2",
|
|
18
18
|
"@types/pg": "8.20.4",
|
|
19
19
|
"arktype": "^2.2.2",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"tinyglobby": "^0.2.17"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@internal/postgres": "8.0.0-rc.17-dev.
|
|
26
|
-
"@repo/tsconfig": "8.0.0-rc.17-dev.
|
|
27
|
-
"@repo/tsdown": "8.0.0-rc.17-dev.
|
|
25
|
+
"@internal/postgres": "8.0.0-rc.17-dev.14",
|
|
26
|
+
"@repo/tsconfig": "8.0.0-rc.17-dev.14",
|
|
27
|
+
"@repo/tsdown": "8.0.0-rc.17-dev.14",
|
|
28
28
|
"tsdown": "0.22.14",
|
|
29
29
|
"typescript": "5.9.3"
|
|
30
30
|
},
|
package/skills/prisma-8/SKILL.md
CHANGED
|
@@ -413,7 +413,7 @@ await db.orm.public.Post.where((p) => and(created(since)(p), p.title.ilike('%orm
|
|
|
413
413
|
|
|
414
414
|
Both forms check values against the codec's type, not the field's. For a field that narrows its codec's values, such as an enum stored as `pg/text@1`, they accept values the field would refuse: `row.kind.eq('superuser')` compiles even when `kind` has no such member. Write a filter on such a field inline, on the model, where the field's own type checks the value.
|
|
415
415
|
|
|
416
|
-
**The same `select` and `include` in several queries.** Define it once with `.fragment(...)` on
|
|
416
|
+
**The same `select` and `include` in several queries.** Define it once with `.fragment(...)` on the model's root collection, such as `db.orm.public.Post`, run it with `.with(...)`, and name its row with `CollectionRowOf`:
|
|
417
417
|
|
|
418
418
|
```typescript
|
|
419
419
|
import type { CollectionRowOf } from '@prisma/orm-postgres/orm-client';
|
|
@@ -427,7 +427,7 @@ await db.orm.public.Post.where({ userId }).with(postSummary).limit(20).all();
|
|
|
427
427
|
await db.orm.public.User.include('posts', (posts) => posts.with(postSummary)).all();
|
|
428
428
|
```
|
|
429
429
|
|
|
430
|
-
The body receives the plain collection of the model, without a custom class's methods. Apply the fragment before `.select(...)` or `.variant(...)`: it is refused on a collection they narrowed. Its result is always typed as the plain collection, even when the body keeps the row, so a custom class's methods are gone after it, and
|
|
430
|
+
The body receives the plain collection of the model, without a custom class's methods. Apply the fragment before `.select(...)` or `.variant(...)`: it is refused on a collection they narrowed. Its result is always typed as the plain collection, even when the body keeps the row, so a custom class's methods are gone after it, and a filter or order applied before it is not recorded, although an earlier `.where(...)` still runs. `update` and `delete` are refused after it unless the body itself calls `where`, and `cursor` unless the body calls `orderBy`. For a filter on one model, use a class method or `db.orm.fragment`. A fragment for one model refuses a collection of another model or namespace at run time with `ORM.ARGUMENT_INVALID`. Calling `.fragment(...)` on a collection with chained calls throws `ORM.ARGUMENT_INVALID`, because the fragment is built from the model alone; a filter, an order or an include before it, or a receiver typed by a type parameter such as `this` in a class method, is a compile error. Inside a class method, chain on `this` directly instead.
|
|
431
431
|
|
|
432
432
|
**A field to order by, from a request.** Pass the request's string to `orderByField` with the fields the endpoint allows. Do not index the field proxy with the raw string:
|
|
433
433
|
|