prisma-ltree 0.3.0 → 0.4.0
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/README.md +52 -26
- package/dist/control.mjs +3 -2
- package/dist/control.mjs.map +1 -1
- package/package.json +11 -10
- package/src/contract.d.ts +116 -20
- package/src/contract.json +3 -2
package/README.md
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
# prisma-ltree
|
|
2
2
|
|
|
3
|
-
A [Prisma
|
|
3
|
+
A [Prisma 8](https://www.prisma.io/docs/orm) extension pack for PostgreSQL’s
|
|
4
4
|
[`ltree`](https://www.postgresql.org/docs/current/ltree.html) hierarchical-tree data type.
|
|
5
5
|
|
|
6
6
|
Model category trees, org charts, taxonomies, and filesystem-like paths in Postgres and query
|
|
7
|
-
them with type-safe
|
|
8
|
-
pattern matching, path manipulation, and lowest-common-ancestor computation
|
|
7
|
+
them with type-safe operators: ancestor/descendant checks, `lquery`/`ltxtquery`
|
|
8
|
+
pattern matching, path manipulation, and lowest-common-ancestor computation, without dropping to
|
|
9
9
|
raw SQL.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- **`ltree` and `ltree[]` columns
|
|
14
|
-
- **Hierarchy operators
|
|
15
|
-
- **Pattern matching
|
|
16
|
-
- **Scalar functions
|
|
17
|
-
- **Concatenation & conversion
|
|
18
|
-
- **Array first-match
|
|
19
|
-
- **Baseline migration
|
|
13
|
+
- **`ltree` and `ltree[]` columns**: `ltree()` / `ltreeArray()` column helpers
|
|
14
|
+
- **Hierarchy operators**: ancestor and descendant checks
|
|
15
|
+
- **Pattern matching**: `lquery`, `lquery[]`, and `ltxtquery`
|
|
16
|
+
- **Scalar functions**: depth, subpaths, label index, lowest common ancestor
|
|
17
|
+
- **Concatenation & conversion**: path building and `ltree` ↔ `text` conversion
|
|
18
|
+
- **Array first-match**: find the first matching path in an `ltree[]` column
|
|
19
|
+
- **Baseline migration**: installs the Postgres extension via
|
|
20
20
|
`CREATE EXTENSION IF NOT EXISTS ltree` when the pack is composed
|
|
21
|
+
- **GiST indexes**: author `@@index([path], type: "gist")` (Prisma 8
|
|
22
|
+
postgres target; default `gist_ltree_ops`)
|
|
21
23
|
|
|
22
24
|
See the [feature support matrix](https://github.com/slovakian/prisma-ltree/blob/main/docs/feature-support.md)
|
|
23
25
|
for what is supported, planned, or out of scope.
|
|
@@ -28,13 +30,17 @@ for what is supported, planned, or out of scope.
|
|
|
28
30
|
pnpm add prisma-ltree
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
Requires Node `>=24
|
|
32
|
-
|
|
33
|
+
Requires Node `>=24`. This pack exact-pins `@prisma/orm-*` to **`8.0.0-rc.8`**.
|
|
34
|
+
`prisma-ltree` itself stays on independent `0.x` semver: install it with a caret.
|
|
35
|
+
You do not need `prisma-ltree@8.0.0-rc.8`. See
|
|
36
|
+
[versioning and compatibility](https://github.com/slovakian/prisma-ltree/blob/main/docs/prisma-next/versioning-and-compatibility.md).
|
|
33
37
|
|
|
34
|
-
Consumer apps
|
|
38
|
+
Consumer apps also depend on the Postgres facade at the same SPI version, plus the
|
|
39
|
+
`prisma` CLI:
|
|
35
40
|
|
|
36
41
|
```bash
|
|
37
|
-
pnpm add @prisma/orm-postgres@8.0.0-rc.
|
|
42
|
+
pnpm add @prisma/orm-postgres@8.0.0-rc.8 prisma-ltree
|
|
43
|
+
pnpm add -D prisma
|
|
38
44
|
```
|
|
39
45
|
|
|
40
46
|
### Agent skills (optional)
|
|
@@ -49,7 +55,7 @@ pnpm dlx skills add slovakian/prisma-ltree --all
|
|
|
49
55
|
## Database setup
|
|
50
56
|
|
|
51
57
|
The extension ships an on-disk baseline migration that installs `ltree` when the pack is composed
|
|
52
|
-
into an application. `prisma
|
|
58
|
+
into an application. `prisma db init` / `db update` apply it automatically. The equivalent
|
|
53
59
|
manual DDL is:
|
|
54
60
|
|
|
55
61
|
```sql
|
|
@@ -58,15 +64,18 @@ CREATE EXTENSION IF NOT EXISTS ltree;
|
|
|
58
64
|
|
|
59
65
|
## Configuration
|
|
60
66
|
|
|
61
|
-
Add the pack to your `prisma
|
|
67
|
+
Add the pack to your `prisma.config.ts`:
|
|
62
68
|
|
|
63
69
|
```typescript
|
|
64
|
-
import {
|
|
70
|
+
import { definePrismaConfig } from "prisma/config";
|
|
71
|
+
import { defineConfig as ormConfig } from "@prisma/orm-postgres/config";
|
|
65
72
|
import ltree from "prisma-ltree/control";
|
|
66
73
|
|
|
67
|
-
export default
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
export default definePrismaConfig({
|
|
75
|
+
orm: ormConfig({
|
|
76
|
+
contract: "./src/prisma/contract.ts",
|
|
77
|
+
extensions: [ltree],
|
|
78
|
+
}),
|
|
70
79
|
});
|
|
71
80
|
```
|
|
72
81
|
|
|
@@ -74,14 +83,14 @@ export default defineConfig({
|
|
|
74
83
|
|
|
75
84
|
### Contract definition
|
|
76
85
|
|
|
77
|
-
Author ltree columns in either lane
|
|
86
|
+
Author ltree columns in either lane: `contract.prisma` (PSL) or `contract.ts`
|
|
78
87
|
(TypeScript). Both emit a byte-identical compiled contract.
|
|
79
88
|
|
|
80
|
-
**PSL lane
|
|
81
|
-
`ltree` into `extensions` in `prisma
|
|
89
|
+
**PSL lane.** Reference the `ltree` namespace constructors (parens required) and compose
|
|
90
|
+
`ltree` into `extensions` in `prisma.config.ts`:
|
|
82
91
|
|
|
83
92
|
```prisma
|
|
84
|
-
// contract.prisma
|
|
93
|
+
// contract.prisma: use prisma
|
|
85
94
|
|
|
86
95
|
types {
|
|
87
96
|
Path = ltree.Ltree() // → pg/ltree@1 / ltree
|
|
@@ -97,6 +106,23 @@ model Page {
|
|
|
97
106
|
}
|
|
98
107
|
```
|
|
99
108
|
|
|
109
|
+
**GiST index** (recommended for ancestor / descendant / `lquery` queries):
|
|
110
|
+
|
|
111
|
+
```prisma
|
|
112
|
+
model Page {
|
|
113
|
+
id String @id @default(uuid())
|
|
114
|
+
path Path
|
|
115
|
+
|
|
116
|
+
@@index([path], type: "gist")
|
|
117
|
+
@@map("page")
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Prisma 8 registers `gist` on the postgres target. `prisma-ltree`
|
|
122
|
+
does not add a second index type. See the
|
|
123
|
+
[indexes guide](https://prisma-ltree.procka.org/docs/indexes) for TypeScript
|
|
124
|
+
authoring, `ltree[]`, and operator-class limits (`siglen` is not expressible).
|
|
125
|
+
|
|
100
126
|
**TypeScript lane**:
|
|
101
127
|
|
|
102
128
|
```typescript
|
|
@@ -204,10 +230,10 @@ const rows = await db.orm.Category.where((c) => c.path.isDescendantOf("Top.Scien
|
|
|
204
230
|
|
|
205
231
|
Use `ltreeArray()` for `ltree[]` columns that expose these methods.
|
|
206
232
|
|
|
207
|
-
`lcaAll` is the array form of `lca`. It is not named `lca` because
|
|
233
|
+
`lcaAll` is the array form of `lca`. It is not named `lca` because Prisma 8
|
|
208
234
|
keys operations by name only and rejects duplicates; scalar columns already
|
|
209
235
|
expose `path.lca(other, ...)` (see ADR-005). Note it returns SQL NULL for an
|
|
210
|
-
empty `ltree[]`, matching the first-match ops
|
|
236
|
+
empty `ltree[]`, matching the first-match ops’ `nullable: false` convention.
|
|
211
237
|
|
|
212
238
|
## Types
|
|
213
239
|
|
package/dist/control.mjs
CHANGED
|
@@ -84,6 +84,7 @@ var contract_default = {
|
|
|
84
84
|
"returning": true
|
|
85
85
|
},
|
|
86
86
|
"sql": {
|
|
87
|
+
"checkConstraint": true,
|
|
87
88
|
"defaultInInsert": true,
|
|
88
89
|
"enums": true,
|
|
89
90
|
"lateral": true,
|
|
@@ -95,8 +96,8 @@ var contract_default = {
|
|
|
95
96
|
meta: {},
|
|
96
97
|
_generated: {
|
|
97
98
|
"warning": "⚠️ GENERATED FILE - DO NOT EDIT",
|
|
98
|
-
"message": "This file is automatically generated by \"prisma
|
|
99
|
-
"regenerate": "To regenerate, run: prisma
|
|
99
|
+
"message": "This file is automatically generated by \"prisma contract emit\".",
|
|
100
|
+
"regenerate": "To regenerate, run: prisma contract emit"
|
|
100
101
|
}
|
|
101
102
|
};
|
|
102
103
|
//#endregion
|
package/dist/control.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.mjs","names":["baselineMetadata","baselineOps"],"sources":["../migrations/20260619T2142_install_ltree/migration.json","../migrations/20260619T2142_install_ltree/ops.json","../migrations/refs/head.json","../src/contract.json","../src/exports/control.ts"],"sourcesContent":["","","","","import type { Contract } from \"@prisma/orm-framework/contract/types\";\nimport type {\n CodecControlHooks,\n SqlControlExtensionDescriptor,\n} from \"@prisma/orm-family-sql/family/control\";\nimport { contractSpaceFromJson } from \"@prisma/orm-toolchain/migration-tools/spaces\";\nimport type { SqlStorage } from \"@prisma/orm-family-sql/contract/types\";\nimport baselineMetadata from \"../../migrations/20260619T2142_install_ltree/migration.json\" with { type: \"json\" };\nimport baselineOps from \"../../migrations/20260619T2142_install_ltree/ops.json\" with { type: \"json\" };\nimport headRef from \"../../migrations/refs/head.json\" with { type: \"json\" };\nimport contractJson from \"../contract.json\" with { type: \"json\" };\nimport { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from \"../core/constants\";\nimport { LTREE_SPACE_ID, LTREE_BASELINE_MIGRATION_NAME } from \"../core/contract-space-constants\";\nimport { ltreePackMeta, ltreeQueryOperations } from \"../core/descriptor-meta\";\n\nconst ltreeControlPlaneHooks: CodecControlHooks = {\n expandNativeType: ({ nativeType }) => nativeType,\n resolveIdentityValue: () => null,\n};\n\nconst ltreeContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({\n contractJson,\n migrations: [\n {\n dirName: LTREE_BASELINE_MIGRATION_NAME,\n metadata: baselineMetadata,\n ops: baselineOps,\n },\n ],\n headRef,\n});\n\nconst ltreeExtensionDescriptor: SqlControlExtensionDescriptor<\"postgres\"> = {\n ...ltreePackMeta,\n id: LTREE_SPACE_ID,\n contractSpace: ltreeContractSpace,\n types: {\n ...ltreePackMeta.types,\n codecTypes: {\n ...ltreePackMeta.types.codecTypes,\n controlPlaneHooks: {\n [LTREE_CODEC_ID]: ltreeControlPlaneHooks,\n [LTREE_ARRAY_CODEC_ID]: ltreeControlPlaneHooks,\n },\n },\n },\n queryOperations: () => ltreeQueryOperations(),\n create: () => ({\n familyId: \"sql\" as const,\n targetId: \"postgres\" as const,\n }),\n};\n\nexport { ltreeExtensionDescriptor };\nexport default ltreeExtensionDescriptor;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"control.mjs","names":["baselineMetadata","baselineOps"],"sources":["../migrations/20260619T2142_install_ltree/migration.json","../migrations/20260619T2142_install_ltree/ops.json","../migrations/refs/head.json","../src/contract.json","../src/exports/control.ts"],"sourcesContent":["","","","","import type { Contract } from \"@prisma/orm-framework/contract/types\";\nimport type {\n CodecControlHooks,\n SqlControlExtensionDescriptor,\n} from \"@prisma/orm-family-sql/family/control\";\nimport { contractSpaceFromJson } from \"@prisma/orm-toolchain/migration-tools/spaces\";\nimport type { SqlStorage } from \"@prisma/orm-family-sql/contract/types\";\nimport baselineMetadata from \"../../migrations/20260619T2142_install_ltree/migration.json\" with { type: \"json\" };\nimport baselineOps from \"../../migrations/20260619T2142_install_ltree/ops.json\" with { type: \"json\" };\nimport headRef from \"../../migrations/refs/head.json\" with { type: \"json\" };\nimport contractJson from \"../contract.json\" with { type: \"json\" };\nimport { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from \"../core/constants\";\nimport { LTREE_SPACE_ID, LTREE_BASELINE_MIGRATION_NAME } from \"../core/contract-space-constants\";\nimport { ltreePackMeta, ltreeQueryOperations } from \"../core/descriptor-meta\";\n\nconst ltreeControlPlaneHooks: CodecControlHooks = {\n expandNativeType: ({ nativeType }) => nativeType,\n resolveIdentityValue: () => null,\n};\n\nconst ltreeContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({\n contractJson,\n migrations: [\n {\n dirName: LTREE_BASELINE_MIGRATION_NAME,\n metadata: baselineMetadata,\n ops: baselineOps,\n },\n ],\n headRef,\n});\n\nconst ltreeExtensionDescriptor: SqlControlExtensionDescriptor<\"postgres\"> = {\n ...ltreePackMeta,\n id: LTREE_SPACE_ID,\n contractSpace: ltreeContractSpace,\n types: {\n ...ltreePackMeta.types,\n codecTypes: {\n ...ltreePackMeta.types.codecTypes,\n controlPlaneHooks: {\n [LTREE_CODEC_ID]: ltreeControlPlaneHooks,\n [LTREE_ARRAY_CODEC_ID]: ltreeControlPlaneHooks,\n },\n },\n },\n queryOperations: () => ltreeQueryOperations(),\n create: () => ({\n familyId: \"sql\" as const,\n targetId: \"postgres\" as const,\n }),\n};\n\nexport { ltreeExtensionDescriptor };\nexport default ltreeExtensionDescriptor;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIeA,MAAM,yBAA4C;CAChD,mBAAmB,EAAE,iBAAiB;CACtC,4BAA4B;AAC9B;AAEA,MAAM,qBAAqB,sBAA4C;CACrE,cAAA;CACA,YAAY,CACV;EACE,SAAS;EACT,UAAUA;EACV,KAAKC;CACP,CACF;CACA,SAAA;AACF,CAAC;AAED,MAAM,2BAAsE;CAC1E,GAAG;CACH,IAAI;CACJ,eAAe;CACf,OAAO;EACL,GAAG,cAAc;EACjB,YAAY;GACV,GAAG,cAAc,MAAM;GACvB,mBAAmB;KAChB,iBAAiB;KACjB,uBAAuB;GAC1B;EACF;CACF;CACA,uBAAuB,qBAAqB;CAC5C,eAAe;EACb,UAAU;EACV,UAAU;CACZ;AACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prisma-ltree",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Prisma
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Prisma 8 extension pack for PostgreSQL's ltree hierarchical tree data type.",
|
|
5
5
|
"homepage": "https://prisma-ltree.procka.org",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -28,25 +28,26 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@prisma/orm-family-sql": "8.0.0-rc.
|
|
32
|
-
"@prisma/orm-framework": "8.0.0-rc.
|
|
33
|
-
"@prisma/orm-toolchain": "8.0.0-rc.
|
|
31
|
+
"@prisma/orm-family-sql": "8.0.0-rc.8",
|
|
32
|
+
"@prisma/orm-framework": "8.0.0-rc.8",
|
|
33
|
+
"@prisma/orm-toolchain": "8.0.0-rc.8",
|
|
34
34
|
"@standard-schema/spec": "^1.1.0",
|
|
35
35
|
"arktype": "^2.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@electric-sql/pglite": "^0.5.3",
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/orm-
|
|
39
|
+
"@prisma/cli-engine": "0.3.0",
|
|
40
|
+
"@prisma/orm-postgres": "8.0.0-rc.8",
|
|
41
|
+
"@prisma/orm-target-postgres": "8.0.0-rc.8",
|
|
41
42
|
"@types/node": "^24",
|
|
42
43
|
"@typescript/native-preview": "7.0.0-dev.20260509.2",
|
|
43
44
|
"@vitest/coverage-v8": "4.1.8",
|
|
44
|
-
"prisma
|
|
45
|
+
"prisma": "8.0.0-rc.12",
|
|
45
46
|
"typescript": "^5",
|
|
46
47
|
"vite-plus": "0.1.24"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"@prisma/orm-target-postgres": "8.0.0-rc.
|
|
50
|
+
"@prisma/orm-target-postgres": "8.0.0-rc.8",
|
|
50
51
|
"typescript": ">=5.9"
|
|
51
52
|
},
|
|
52
53
|
"peerDependenciesMeta": {
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"dev": "vp pack --watch",
|
|
73
74
|
"test": "vp test",
|
|
74
75
|
"check": "vp check",
|
|
75
|
-
"build:contract-space": "prisma
|
|
76
|
+
"build:contract-space": "prisma contract emit",
|
|
76
77
|
"check-pins": "node ./scripts/check-pins.mjs"
|
|
77
78
|
}
|
|
78
79
|
}
|
package/src/contract.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ⚠️ GENERATED FILE - DO NOT EDIT
|
|
2
|
-
// This file is automatically generated by 'prisma
|
|
3
|
-
// To regenerate, run: prisma
|
|
2
|
+
// This file is automatically generated by 'prisma contract emit'.
|
|
3
|
+
// To regenerate, run: prisma contract emit
|
|
4
4
|
import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-postgres/adapter/operation-types';
|
|
5
5
|
import type {
|
|
6
6
|
Bit,
|
|
@@ -10,8 +10,11 @@ import type {
|
|
|
10
10
|
JsonValue,
|
|
11
11
|
Numeric,
|
|
12
12
|
Time,
|
|
13
|
+
TimeString,
|
|
13
14
|
Timestamp,
|
|
15
|
+
TimestampString,
|
|
14
16
|
Timestamptz,
|
|
17
|
+
TimestamptzString,
|
|
15
18
|
Timetz,
|
|
16
19
|
VarBit,
|
|
17
20
|
Varchar,
|
|
@@ -44,18 +47,38 @@ export type AggregateTypes = {
|
|
|
44
47
|
readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
45
48
|
readonly 'pg/float4@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
46
49
|
readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
50
|
+
readonly 'pg/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
51
|
+
readonly 'pg/int2@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
52
|
+
readonly 'pg/int4@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
53
|
+
readonly 'pg/int8@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
54
|
+
readonly 'pg/int8number@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
55
|
+
readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
56
|
+
readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
57
|
+
readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
58
|
+
readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
59
|
+
readonly 'pg/unboundedint@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
60
|
+
readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
61
|
+
readonly 'sql/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly avgDecimal: {
|
|
65
|
+
readonly byCodec: {
|
|
47
66
|
readonly 'pg/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
48
67
|
readonly 'pg/int2@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
49
68
|
readonly 'pg/int4@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
50
69
|
readonly 'pg/int8@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
51
|
-
readonly 'pg/
|
|
70
|
+
readonly 'pg/int8number@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
52
71
|
readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
53
|
-
readonly 'pg/
|
|
54
|
-
readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
72
|
+
readonly 'pg/unboundedint@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
55
73
|
readonly 'sql/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
56
74
|
};
|
|
57
75
|
};
|
|
58
76
|
readonly count: {
|
|
77
|
+
readonly byCodec: {};
|
|
78
|
+
readonly withoutInput: { readonly output: 'pg/int8number@1'; readonly nullable: false };
|
|
79
|
+
readonly anyInput: { readonly output: 'pg/int8number@1'; readonly nullable: false };
|
|
80
|
+
};
|
|
81
|
+
readonly countBigInt: {
|
|
59
82
|
readonly byCodec: {};
|
|
60
83
|
readonly withoutInput: { readonly output: 'pg/int8@1'; readonly nullable: false };
|
|
61
84
|
readonly anyInput: { readonly output: 'pg/int8@1'; readonly nullable: false };
|
|
@@ -63,7 +86,11 @@ export type AggregateTypes = {
|
|
|
63
86
|
readonly max: {
|
|
64
87
|
readonly byCodec: {
|
|
65
88
|
readonly 'pg/char@1': { readonly output: 'pg/char@1'; readonly nullable: true };
|
|
66
|
-
readonly 'pg/date@1': { readonly output: 'pg/date@1'; readonly nullable: true };
|
|
89
|
+
readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true };
|
|
90
|
+
readonly 'pg/date-temporal@1': {
|
|
91
|
+
readonly output: 'pg/date-temporal@1';
|
|
92
|
+
readonly nullable: true;
|
|
93
|
+
};
|
|
67
94
|
readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true };
|
|
68
95
|
readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true };
|
|
69
96
|
readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true };
|
|
@@ -73,27 +100,53 @@ export type AggregateTypes = {
|
|
|
73
100
|
readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true };
|
|
74
101
|
readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true };
|
|
75
102
|
readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
|
|
103
|
+
readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
76
104
|
readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
77
105
|
readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
78
106
|
readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true };
|
|
79
107
|
readonly 'pg/text@1': { readonly output: 'pg/text@1'; readonly nullable: true };
|
|
80
|
-
readonly 'pg/time@1': { readonly output: 'pg/time@1'; readonly nullable: true };
|
|
81
|
-
readonly 'pg/
|
|
82
|
-
|
|
108
|
+
readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true };
|
|
109
|
+
readonly 'pg/time-temporal@1': {
|
|
110
|
+
readonly output: 'pg/time-temporal@1';
|
|
111
|
+
readonly nullable: true;
|
|
112
|
+
};
|
|
113
|
+
readonly 'pg/timestamp-string@1': {
|
|
114
|
+
readonly output: 'pg/timestamp-string@1';
|
|
115
|
+
readonly nullable: true;
|
|
116
|
+
};
|
|
117
|
+
readonly 'pg/timestamp-temporal@1': {
|
|
118
|
+
readonly output: 'pg/timestamp-temporal@1';
|
|
119
|
+
readonly nullable: true;
|
|
120
|
+
};
|
|
121
|
+
readonly 'pg/timestamptz-string@1': {
|
|
122
|
+
readonly output: 'pg/timestamptz-string@1';
|
|
123
|
+
readonly nullable: true;
|
|
124
|
+
};
|
|
125
|
+
readonly 'pg/timestamptz-temporal@1': {
|
|
126
|
+
readonly output: 'pg/timestamptz-temporal@1';
|
|
127
|
+
readonly nullable: true;
|
|
128
|
+
};
|
|
83
129
|
readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true };
|
|
130
|
+
readonly 'pg/unboundedint@1': {
|
|
131
|
+
readonly output: 'pg/unboundedint@1';
|
|
132
|
+
readonly nullable: true;
|
|
133
|
+
};
|
|
84
134
|
readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
|
|
85
135
|
readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true };
|
|
86
136
|
readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true };
|
|
87
137
|
readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true };
|
|
88
138
|
readonly 'sql/text@1': { readonly output: 'sql/text@1'; readonly nullable: true };
|
|
89
|
-
readonly 'sql/timestamp@1': { readonly output: 'sql/timestamp@1'; readonly nullable: true };
|
|
90
139
|
readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
|
|
91
140
|
};
|
|
92
141
|
};
|
|
93
142
|
readonly min: {
|
|
94
143
|
readonly byCodec: {
|
|
95
144
|
readonly 'pg/char@1': { readonly output: 'pg/char@1'; readonly nullable: true };
|
|
96
|
-
readonly 'pg/date@1': { readonly output: 'pg/date@1'; readonly nullable: true };
|
|
145
|
+
readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true };
|
|
146
|
+
readonly 'pg/date-temporal@1': {
|
|
147
|
+
readonly output: 'pg/date-temporal@1';
|
|
148
|
+
readonly nullable: true;
|
|
149
|
+
};
|
|
97
150
|
readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true };
|
|
98
151
|
readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true };
|
|
99
152
|
readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true };
|
|
@@ -103,20 +156,42 @@ export type AggregateTypes = {
|
|
|
103
156
|
readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true };
|
|
104
157
|
readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true };
|
|
105
158
|
readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
|
|
159
|
+
readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
106
160
|
readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
107
161
|
readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
108
162
|
readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true };
|
|
109
163
|
readonly 'pg/text@1': { readonly output: 'pg/text@1'; readonly nullable: true };
|
|
110
|
-
readonly 'pg/time@1': { readonly output: 'pg/time@1'; readonly nullable: true };
|
|
111
|
-
readonly 'pg/
|
|
112
|
-
|
|
164
|
+
readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true };
|
|
165
|
+
readonly 'pg/time-temporal@1': {
|
|
166
|
+
readonly output: 'pg/time-temporal@1';
|
|
167
|
+
readonly nullable: true;
|
|
168
|
+
};
|
|
169
|
+
readonly 'pg/timestamp-string@1': {
|
|
170
|
+
readonly output: 'pg/timestamp-string@1';
|
|
171
|
+
readonly nullable: true;
|
|
172
|
+
};
|
|
173
|
+
readonly 'pg/timestamp-temporal@1': {
|
|
174
|
+
readonly output: 'pg/timestamp-temporal@1';
|
|
175
|
+
readonly nullable: true;
|
|
176
|
+
};
|
|
177
|
+
readonly 'pg/timestamptz-string@1': {
|
|
178
|
+
readonly output: 'pg/timestamptz-string@1';
|
|
179
|
+
readonly nullable: true;
|
|
180
|
+
};
|
|
181
|
+
readonly 'pg/timestamptz-temporal@1': {
|
|
182
|
+
readonly output: 'pg/timestamptz-temporal@1';
|
|
183
|
+
readonly nullable: true;
|
|
184
|
+
};
|
|
113
185
|
readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true };
|
|
186
|
+
readonly 'pg/unboundedint@1': {
|
|
187
|
+
readonly output: 'pg/unboundedint@1';
|
|
188
|
+
readonly nullable: true;
|
|
189
|
+
};
|
|
114
190
|
readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
|
|
115
191
|
readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true };
|
|
116
192
|
readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true };
|
|
117
193
|
readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true };
|
|
118
194
|
readonly 'sql/text@1': { readonly output: 'sql/text@1'; readonly nullable: true };
|
|
119
|
-
readonly 'sql/timestamp@1': { readonly output: 'sql/timestamp@1'; readonly nullable: true };
|
|
120
195
|
readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
|
|
121
196
|
};
|
|
122
197
|
};
|
|
@@ -125,14 +200,34 @@ export type AggregateTypes = {
|
|
|
125
200
|
readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
126
201
|
readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true };
|
|
127
202
|
readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
128
|
-
readonly 'pg/int@1': { readonly output: 'pg/
|
|
129
|
-
readonly 'pg/int2@1': { readonly output: 'pg/
|
|
130
|
-
readonly 'pg/int4@1': { readonly output: 'pg/
|
|
131
|
-
readonly 'pg/int8@1': { readonly output: 'pg/
|
|
203
|
+
readonly 'pg/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
204
|
+
readonly 'pg/int2@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
205
|
+
readonly 'pg/int4@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
206
|
+
readonly 'pg/int8@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
207
|
+
readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
132
208
|
readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
133
209
|
readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
|
|
134
|
-
readonly 'pg/time@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
210
|
+
readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
211
|
+
readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
|
|
212
|
+
readonly 'pg/unboundedint@1': {
|
|
213
|
+
readonly output: 'pg/unboundedint@1';
|
|
214
|
+
readonly nullable: true;
|
|
215
|
+
};
|
|
135
216
|
readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
|
|
217
|
+
readonly 'sql/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
readonly sumBigInt: {
|
|
221
|
+
readonly byCodec: {
|
|
222
|
+
readonly 'pg/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
|
|
223
|
+
readonly 'pg/int2@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
|
|
224
|
+
readonly 'pg/int4@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
|
|
225
|
+
readonly 'pg/int8@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true };
|
|
226
|
+
readonly 'pg/int8number@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true };
|
|
227
|
+
readonly 'pg/unboundedint@1': {
|
|
228
|
+
readonly output: 'pg/unboundedint@1';
|
|
229
|
+
readonly nullable: true;
|
|
230
|
+
};
|
|
136
231
|
readonly 'sql/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
|
|
137
232
|
};
|
|
138
233
|
};
|
|
@@ -204,6 +299,7 @@ type ContractBase = Omit<
|
|
|
204
299
|
readonly returning: true;
|
|
205
300
|
};
|
|
206
301
|
readonly sql: {
|
|
302
|
+
readonly checkConstraint: true;
|
|
207
303
|
readonly defaultInInsert: true;
|
|
208
304
|
readonly enums: true;
|
|
209
305
|
readonly lateral: true;
|
package/src/contract.json
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"returning": true
|
|
46
46
|
},
|
|
47
47
|
"sql": {
|
|
48
|
+
"checkConstraint": true,
|
|
48
49
|
"defaultInInsert": true,
|
|
49
50
|
"enums": true,
|
|
50
51
|
"lateral": true,
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"meta": {},
|
|
57
58
|
"_generated": {
|
|
58
59
|
"warning": "⚠️ GENERATED FILE - DO NOT EDIT",
|
|
59
|
-
"message": "This file is automatically generated by \"prisma
|
|
60
|
-
"regenerate": "To regenerate, run: prisma
|
|
60
|
+
"message": "This file is automatically generated by \"prisma contract emit\".",
|
|
61
|
+
"regenerate": "To regenerate, run: prisma contract emit"
|
|
61
62
|
}
|
|
62
63
|
}
|