prisma-ltree 0.3.0 → 0.5.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/dist/pack.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as CodecTypes } from "./codec-types-ECy3aUGO.mjs";
1
+ import { t as CodecTypes } from "./codec-types-BJE-5cwk.mjs";
2
2
  //#region src/core/descriptor-meta.d.ts
3
3
  declare const ltreePackMetaBase: {
4
4
  readonly kind: "extension";
@@ -16,21 +16,22 @@ declare const ltreePackMetaBase: {
16
16
  readonly ltree: {
17
17
  readonly Ltree: {
18
18
  readonly kind: "typeConstructor";
19
+ readonly inferred: true;
19
20
  readonly output: {
20
21
  readonly codecId: "pg/ltree@1";
21
- readonly nativeType: "ltree";
22
22
  };
23
23
  };
24
24
  readonly LtreeArray: {
25
25
  readonly kind: "typeConstructor";
26
+ readonly inferred: true;
26
27
  readonly output: {
27
28
  readonly codecId: "pg/ltree-array@1";
28
- readonly nativeType: "ltree[]";
29
29
  };
30
30
  };
31
31
  };
32
32
  };
33
33
  };
34
+ readonly dataTypes: readonly import("@prisma/orm-framework/components/codec").DataType[];
34
35
  readonly types: {
35
36
  readonly codecTypes: {
36
37
  readonly codecDescriptors: import("@prisma/orm-framework/components/codec").CodecDescriptor<unknown>[];
@@ -52,17 +53,6 @@ declare const ltreePackMetaBase: {
52
53
  readonly alias: "LtreeQueryOperationTypes";
53
54
  };
54
55
  };
55
- readonly storage: readonly [{
56
- readonly typeId: "pg/ltree@1";
57
- readonly familyId: "sql";
58
- readonly targetId: "postgres";
59
- readonly nativeType: "ltree";
60
- }, {
61
- readonly typeId: "pg/ltree-array@1";
62
- readonly familyId: "sql";
63
- readonly targetId: "postgres";
64
- readonly nativeType: "ltree[]";
65
- }];
66
56
  };
67
57
  };
68
58
  declare const ltreePackMeta: typeof ltreePackMetaBase & {
@@ -1 +1 @@
1
- {"version":3,"file":"pack.d.mts","names":[],"sources":["../src/core/descriptor-meta.ts"],"mappings":";;cA6SM,iBAAA;EAAA,SACJ,IAAA;EAAA,SACA,EAAA;EAAA,SACA,QAAA;EAAA,SACA,QAAA;EAAA,SACA,OAAA;EAAA,SACA,YAAA;IAAA,SACE,QAAA;MAAA,SACE,YAAA;IAAA;EAAA;EAAA,SAGJ,SAAA;IAAA,SACE,IAAA;MAAA;;;;;;;;;;;;;;;;;;WAEF,KAAA;IAAA,SACE,UAAA;MAAA,SACE,gBAAA,mDAAgB,eAAA;MAAA,SAChB,MAAA;QAAA,SACE,OAAA;QAAA,SACA,KAAA;QAAA,SACA,KAAA;MAAA;MAAA,SAEF,WAAA;QAAA,SAEI,OAAA;QAAA,SACA,KAAA;QAAA,SACA,KAAA;MAAA;IAAA;IAAA,SAIN,mBAAA;MAAA,SACE,MAAA;QAAA,SACE,OAAA;QAAA,SACA,KAAA;QAAA,SACA,KAAA;MAAA;IAAA;IAAA,SAGJ,OAAA;MAAA,SAEI,MAAA;MAAA,SACA,QAAA;MAAA,SACA,QAAA;MAAA,SACA,UAAA;IAAA;MAAA,SAGA,MAAA;MAAA,SACA,QAAA;MAAA,SACA,QAAA;MAAA,SACA,UAAA;IAAA;EAAA;AAAA;AAAA,cAMK,aAAA,SAAsB,iBAAA;EAAA,SACxB,YAAA,GAAe,UAAU;AAAA"}
1
+ {"version":3,"file":"pack.d.mts","names":[],"sources":["../src/core/descriptor-meta.ts"],"mappings":";;cA0SM,iBAAA;EAAA,SACJ,IAAA;EAAA,SACA,EAAA;EAAA,SACA,QAAA;EAAA,SACA,QAAA;EAAA,SACA,OAAA;EAAA,SACA,YAAA;IAAA,SACE,QAAA;MAAA,SACE,YAAA;IAAA;EAAA;EAAA,SAGJ,SAAA;IAAA,SACE,IAAA;MAAA;;;;;;;;;;;;;;;;;;WAEF,SAAA,4DAAS,QAAA;EAAA,SACT,KAAA;IAAA,SACE,UAAA;MAAA,SACE,gBAAA,mDAAgB,eAAA;MAAA,SAChB,MAAA;QAAA,SACE,OAAA;QAAA,SACA,KAAA;QAAA,SACA,KAAA;MAAA;MAAA,SAEF,WAAA;QAAA,SAEI,OAAA;QAAA,SACA,KAAA;QAAA,SACA,KAAA;MAAA;IAAA;IAAA,SAIN,mBAAA;MAAA,SACE,MAAA;QAAA,SACE,OAAA;QAAA,SACA,KAAA;QAAA,SACA,KAAA;MAAA;IAAA;EAAA;AAAA;AAAA,cAMK,aAAA,SAAsB,iBAAA;EAAA,SACxB,YAAA,GAAe,UAAU;AAAA"}
package/dist/pack.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as ltreePackMeta } from "./descriptor-meta-D2gu1NKP.mjs";
1
+ import { t as ltreePackMeta } from "./descriptor-meta-2In8FI1I.mjs";
2
2
  export { ltreePackMeta as default };
package/dist/runtime.mjs CHANGED
@@ -1,9 +1,10 @@
1
- import { n as ltreeQueryOperations, r as ltreeCodecRegistry, t as ltreePackMeta } from "./descriptor-meta-D2gu1NKP.mjs";
1
+ import { n as ltreeQueryOperations, r as ltreeCodecRegistry, t as ltreePackMeta } from "./descriptor-meta-2In8FI1I.mjs";
2
2
  //#region src/exports/runtime.ts
3
3
  const ltreeRuntimeDescriptor = {
4
4
  kind: "extension",
5
5
  id: ltreePackMeta.id,
6
6
  version: ltreePackMeta.version,
7
+ dataTypes: ltreePackMeta.dataTypes,
7
8
  familyId: "sql",
8
9
  targetId: "postgres",
9
10
  types: { codecTypes: { codecDescriptors: Array.from(ltreeCodecRegistry.values()) } },
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.mjs","names":[],"sources":["../src/exports/runtime.ts"],"sourcesContent":["import type { SqlRuntimeExtensionDescriptor } from \"@prisma/orm-family-sql/runtime\";\nimport { ltreePackMeta, ltreeQueryOperations } from \"../core/descriptor-meta\";\nimport { ltreeCodecRegistry } from \"../core/registry\";\n\nconst ltreeRuntimeDescriptor: SqlRuntimeExtensionDescriptor<\"postgres\"> = {\n kind: \"extension\" as const,\n id: ltreePackMeta.id,\n version: ltreePackMeta.version,\n familyId: \"sql\" as const,\n targetId: \"postgres\" as const,\n types: {\n codecTypes: {\n codecDescriptors: Array.from(ltreeCodecRegistry.values()),\n },\n },\n codecs: () => Array.from(ltreeCodecRegistry.values()),\n queryOperations: () => ltreeQueryOperations(),\n create() {\n return {\n familyId: \"sql\" as const,\n targetId: \"postgres\" as const,\n };\n },\n};\n\nexport { ltreeCodecRegistry };\nexport default ltreeRuntimeDescriptor;\n"],"mappings":";;AAIA,MAAM,yBAAoE;CACxE,MAAM;CACN,IAAI,cAAc;CAClB,SAAS,cAAc;CACvB,UAAU;CACV,UAAU;CACV,OAAO,EACL,YAAY,EACV,kBAAkB,MAAM,KAAK,mBAAmB,OAAO,CAAC,EAC1D,EACF;CACA,cAAc,MAAM,KAAK,mBAAmB,OAAO,CAAC;CACpD,uBAAuB,qBAAqB;CAC5C,SAAS;EACP,OAAO;GACL,UAAU;GACV,UAAU;EACZ;CACF;AACF"}
1
+ {"version":3,"file":"runtime.mjs","names":[],"sources":["../src/exports/runtime.ts"],"sourcesContent":["import type { SqlRuntimeExtensionDescriptor } from \"@prisma/orm-family-sql/runtime\";\nimport { ltreePackMeta, ltreeQueryOperations } from \"../core/descriptor-meta\";\nimport { ltreeCodecRegistry } from \"../core/registry\";\n\nconst ltreeRuntimeDescriptor: SqlRuntimeExtensionDescriptor<\"postgres\"> = {\n kind: \"extension\" as const,\n id: ltreePackMeta.id,\n version: ltreePackMeta.version,\n dataTypes: ltreePackMeta.dataTypes,\n familyId: \"sql\" as const,\n targetId: \"postgres\" as const,\n types: {\n codecTypes: {\n codecDescriptors: Array.from(ltreeCodecRegistry.values()),\n },\n },\n codecs: () => Array.from(ltreeCodecRegistry.values()),\n queryOperations: () => ltreeQueryOperations(),\n create() {\n return {\n familyId: \"sql\" as const,\n targetId: \"postgres\" as const,\n };\n },\n};\n\nexport { ltreeCodecRegistry };\nexport default ltreeRuntimeDescriptor;\n"],"mappings":";;AAIA,MAAM,yBAAoE;CACxE,MAAM;CACN,IAAI,cAAc;CAClB,SAAS,cAAc;CACvB,WAAW,cAAc;CACzB,UAAU;CACV,UAAU;CACV,OAAO,EACL,YAAY,EACV,kBAAkB,MAAM,KAAK,mBAAmB,OAAO,CAAC,EAC1D,EACF;CACA,cAAc,MAAM,KAAK,mBAAmB,OAAO,CAAC;CACpD,uBAAuB,qBAAqB;CAC5C,SAAS;EACP,OAAO;GACL,UAAU;GACV,UAAU;EACZ;CACF;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prisma-ltree",
3
- "version": "0.3.0",
4
- "description": "Prisma Next (8.0.0-rc) extension pack for PostgreSQL's ltree hierarchical tree data type.",
3
+ "version": "0.5.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.1",
32
- "@prisma/orm-framework": "8.0.0-rc.1",
33
- "@prisma/orm-toolchain": "8.0.0-rc.1",
31
+ "@prisma/orm-family-sql": "8.0.0-rc.16",
32
+ "@prisma/orm-framework": "8.0.0-rc.16",
33
+ "@prisma/orm-toolchain": "8.0.0-rc.16",
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/orm-postgres": "8.0.0-rc.1",
40
- "@prisma/orm-target-postgres": "8.0.0-rc.1",
39
+ "@prisma/cli-engine": "0.6.3",
40
+ "@prisma/orm-postgres": "8.0.0-rc.16",
41
+ "@prisma/orm-target-postgres": "8.0.0-rc.16",
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-next": "8.0.0-rc.1",
45
+ "prisma": "8.0.0-rc.21",
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.1",
50
+ "@prisma/orm-target-postgres": "8.0.0-rc.16",
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-next contract emit",
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,7 +1,6 @@
1
1
  // ⚠️ GENERATED FILE - DO NOT EDIT
2
- // This file is automatically generated by 'prisma-next contract emit'.
3
- // To regenerate, run: prisma-next contract emit
4
- import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-postgres/adapter/operation-types';
2
+ // This file is automatically generated by 'prisma contract emit'.
3
+ // To regenerate, run: prisma contract emit
5
4
  import type {
6
5
  Bit,
7
6
  Char,
@@ -10,15 +9,20 @@ import type {
10
9
  JsonValue,
11
10
  Numeric,
12
11
  Time,
12
+ TimeString,
13
13
  Timestamp,
14
+ TimestampString,
14
15
  Timestamptz,
16
+ TimestamptzString,
15
17
  Timetz,
16
18
  VarBit,
17
19
  Varchar,
18
20
  } from '@prisma/orm-postgres/target/codec-types';
21
+ import type { QueryOperationTypes as PgTargetQueryOps } from '@prisma/orm-postgres/target/operation-types';
19
22
 
20
23
  import type {
21
24
  ContractWithTypeMaps,
25
+ RelationKeys,
22
26
  TypeMaps as TypeMapsType,
23
27
  } from '@prisma/orm-postgres/family-contract/types';
24
28
  import type {
@@ -30,32 +34,52 @@ import type {
30
34
  } from '@prisma/orm-postgres/contract/types';
31
35
 
32
36
  export type StorageHash =
33
- StorageHashBase<'ca70941530ea2af306b38e95be66ab1deac79357bcfafb48302d07c8f2c9aa92'>;
37
+ StorageHashBase<'5842622c2779cd02acd640ab4a5c8979fc94a2af8ed034222391fbd4f7cb3706'>;
34
38
  export type ExecutionHash = ExecutionHashBase<string>;
35
39
  export type ProfileHash =
36
40
  ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>;
37
41
 
38
42
  export type CodecTypes = PgTypes;
39
43
  export type LaneCodecTypes = CodecTypes;
40
- export type QueryOperationTypes = PgAdapterQueryOps<CodecTypes>;
44
+ export type QueryOperationTypes = PgTargetQueryOps<CodecTypes>;
41
45
  export type AggregateTypes = {
42
46
  readonly avg: {
43
47
  readonly byCodec: {
44
48
  readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
45
49
  readonly 'pg/float4@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
46
50
  readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
51
+ readonly 'pg/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
52
+ readonly 'pg/int2@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
53
+ readonly 'pg/int4@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
54
+ readonly 'pg/int8@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
55
+ readonly 'pg/int8number@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
56
+ readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
57
+ readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
58
+ readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
59
+ readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
60
+ readonly 'pg/unboundedint@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
61
+ readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
62
+ readonly 'sql/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
63
+ };
64
+ };
65
+ readonly avgDecimal: {
66
+ readonly byCodec: {
47
67
  readonly 'pg/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
48
68
  readonly 'pg/int2@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
49
69
  readonly 'pg/int4@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
50
70
  readonly 'pg/int8@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
51
- readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
71
+ readonly 'pg/int8number@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
52
72
  readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
53
- readonly 'pg/time@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
54
- readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
73
+ readonly 'pg/unboundedint@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
55
74
  readonly 'sql/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
56
75
  };
57
76
  };
58
77
  readonly count: {
78
+ readonly byCodec: {};
79
+ readonly withoutInput: { readonly output: 'pg/int8number@1'; readonly nullable: false };
80
+ readonly anyInput: { readonly output: 'pg/int8number@1'; readonly nullable: false };
81
+ };
82
+ readonly countBigInt: {
59
83
  readonly byCodec: {};
60
84
  readonly withoutInput: { readonly output: 'pg/int8@1'; readonly nullable: false };
61
85
  readonly anyInput: { readonly output: 'pg/int8@1'; readonly nullable: false };
@@ -63,7 +87,11 @@ export type AggregateTypes = {
63
87
  readonly max: {
64
88
  readonly byCodec: {
65
89
  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 };
90
+ readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true };
91
+ readonly 'pg/date-temporal@1': {
92
+ readonly output: 'pg/date-temporal@1';
93
+ readonly nullable: true;
94
+ };
67
95
  readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true };
68
96
  readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true };
69
97
  readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true };
@@ -73,27 +101,57 @@ export type AggregateTypes = {
73
101
  readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true };
74
102
  readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true };
75
103
  readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
104
+ readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
76
105
  readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
77
106
  readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
78
107
  readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true };
79
108
  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/timestamp@1': { readonly output: 'pg/timestamp@1'; readonly nullable: true };
82
- readonly 'pg/timestamptz@1': { readonly output: 'pg/timestamptz@1'; readonly nullable: true };
109
+ readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true };
110
+ readonly 'pg/time-temporal@1': {
111
+ readonly output: 'pg/time-temporal@1';
112
+ readonly nullable: true;
113
+ };
114
+ readonly 'pg/timestamp-string@1': {
115
+ readonly output: 'pg/timestamp-string@1';
116
+ readonly nullable: true;
117
+ };
118
+ readonly 'pg/timestamp-temporal@1': {
119
+ readonly output: 'pg/timestamp-temporal@1';
120
+ readonly nullable: true;
121
+ };
122
+ readonly 'pg/timestamptz-date@1': {
123
+ readonly output: 'pg/timestamptz-date@1';
124
+ readonly nullable: true;
125
+ };
126
+ readonly 'pg/timestamptz-string@1': {
127
+ readonly output: 'pg/timestamptz-string@1';
128
+ readonly nullable: true;
129
+ };
130
+ readonly 'pg/timestamptz-temporal@1': {
131
+ readonly output: 'pg/timestamptz-temporal@1';
132
+ readonly nullable: true;
133
+ };
83
134
  readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true };
135
+ readonly 'pg/unboundedint@1': {
136
+ readonly output: 'pg/unboundedint@1';
137
+ readonly nullable: true;
138
+ };
84
139
  readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
85
140
  readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true };
86
141
  readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true };
87
142
  readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true };
88
143
  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
144
  readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
91
145
  };
92
146
  };
93
147
  readonly min: {
94
148
  readonly byCodec: {
95
149
  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 };
150
+ readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true };
151
+ readonly 'pg/date-temporal@1': {
152
+ readonly output: 'pg/date-temporal@1';
153
+ readonly nullable: true;
154
+ };
97
155
  readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true };
98
156
  readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true };
99
157
  readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true };
@@ -103,20 +161,46 @@ export type AggregateTypes = {
103
161
  readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true };
104
162
  readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true };
105
163
  readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
164
+ readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
106
165
  readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
107
166
  readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
108
167
  readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true };
109
168
  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/timestamp@1': { readonly output: 'pg/timestamp@1'; readonly nullable: true };
112
- readonly 'pg/timestamptz@1': { readonly output: 'pg/timestamptz@1'; readonly nullable: true };
169
+ readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true };
170
+ readonly 'pg/time-temporal@1': {
171
+ readonly output: 'pg/time-temporal@1';
172
+ readonly nullable: true;
173
+ };
174
+ readonly 'pg/timestamp-string@1': {
175
+ readonly output: 'pg/timestamp-string@1';
176
+ readonly nullable: true;
177
+ };
178
+ readonly 'pg/timestamp-temporal@1': {
179
+ readonly output: 'pg/timestamp-temporal@1';
180
+ readonly nullable: true;
181
+ };
182
+ readonly 'pg/timestamptz-date@1': {
183
+ readonly output: 'pg/timestamptz-date@1';
184
+ readonly nullable: true;
185
+ };
186
+ readonly 'pg/timestamptz-string@1': {
187
+ readonly output: 'pg/timestamptz-string@1';
188
+ readonly nullable: true;
189
+ };
190
+ readonly 'pg/timestamptz-temporal@1': {
191
+ readonly output: 'pg/timestamptz-temporal@1';
192
+ readonly nullable: true;
193
+ };
113
194
  readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true };
195
+ readonly 'pg/unboundedint@1': {
196
+ readonly output: 'pg/unboundedint@1';
197
+ readonly nullable: true;
198
+ };
114
199
  readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
115
200
  readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true };
116
201
  readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true };
117
202
  readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true };
118
203
  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
204
  readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true };
121
205
  };
122
206
  };
@@ -125,14 +209,34 @@ export type AggregateTypes = {
125
209
  readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
126
210
  readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true };
127
211
  readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
128
- readonly 'pg/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
129
- readonly 'pg/int2@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
130
- readonly 'pg/int4@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
131
- readonly 'pg/int8@1': { readonly output: 'pg/numeric@1'; readonly nullable: true };
212
+ readonly 'pg/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
213
+ readonly 'pg/int2@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
214
+ readonly 'pg/int4@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
215
+ readonly 'pg/int8@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
216
+ readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
132
217
  readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
133
218
  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 };
219
+ readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
220
+ readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true };
221
+ readonly 'pg/unboundedint@1': {
222
+ readonly output: 'pg/unboundedint@1';
223
+ readonly nullable: true;
224
+ };
135
225
  readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true };
226
+ readonly 'sql/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true };
227
+ };
228
+ };
229
+ readonly sumBigInt: {
230
+ readonly byCodec: {
231
+ readonly 'pg/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
232
+ readonly 'pg/int2@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
233
+ readonly 'pg/int4@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
234
+ readonly 'pg/int8@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true };
235
+ readonly 'pg/int8number@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true };
236
+ readonly 'pg/unboundedint@1': {
237
+ readonly output: 'pg/unboundedint@1';
238
+ readonly nullable: true;
239
+ };
136
240
  readonly 'sql/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true };
137
241
  };
138
242
  };
@@ -147,6 +251,13 @@ export type FieldOutputTypes = { readonly public: Record<string, never> };
147
251
  export type FieldInputTypes = { readonly public: Record<string, never> };
148
252
  export type StorageColumnTypes = { readonly public: {} };
149
253
  export type StorageColumnInputTypes = { readonly public: {} };
254
+
255
+ export namespace Models {}
256
+
257
+ export declare const models: {
258
+ public: {};
259
+ };
260
+
150
261
  export type TypeMaps = TypeMapsType<
151
262
  CodecTypes,
152
263
  QueryOperationTypes,
@@ -170,13 +281,13 @@ type ContractBase = Omit<
170
281
  readonly ltree: {
171
282
  readonly kind: 'codec-instance';
172
283
  readonly codecId: 'pg/ltree@1';
173
- readonly nativeType: 'ltree';
284
+ readonly dataType: 'ltree/ltree';
174
285
  readonly typeParams: Record<string, never>;
175
286
  };
176
287
  readonly ltreeArray: {
177
288
  readonly kind: 'codec-instance';
178
289
  readonly codecId: 'pg/ltree-array@1';
179
- readonly nativeType: 'ltree[]';
290
+ readonly dataType: 'ltree/ltree-array';
180
291
  readonly typeParams: Record<string, never>;
181
292
  };
182
293
  };
@@ -204,8 +315,11 @@ type ContractBase = Omit<
204
315
  readonly returning: true;
205
316
  };
206
317
  readonly sql: {
318
+ readonly checkConstraint: true;
207
319
  readonly defaultInInsert: true;
208
320
  readonly enums: true;
321
+ readonly insertOnConflictSkip: true;
322
+ readonly insertOnConflictWithoutTarget: true;
209
323
  readonly lateral: true;
210
324
  readonly returning: true;
211
325
  readonly scalarList: true;
package/src/contract.json CHANGED
@@ -21,17 +21,17 @@
21
21
  "kind": "postgres-schema"
22
22
  }
23
23
  },
24
- "storageHash": "ca70941530ea2af306b38e95be66ab1deac79357bcfafb48302d07c8f2c9aa92",
24
+ "storageHash": "5842622c2779cd02acd640ab4a5c8979fc94a2af8ed034222391fbd4f7cb3706",
25
25
  "types": {
26
26
  "ltree": {
27
27
  "codecId": "pg/ltree@1",
28
- "kind": "codec-instance",
29
- "nativeType": "ltree"
28
+ "dataType": "ltree/ltree",
29
+ "kind": "codec-instance"
30
30
  },
31
31
  "ltreeArray": {
32
32
  "codecId": "pg/ltree-array@1",
33
- "kind": "codec-instance",
34
- "nativeType": "ltree[]"
33
+ "dataType": "ltree/ltree-array",
34
+ "kind": "codec-instance"
35
35
  }
36
36
  }
37
37
  },
@@ -45,8 +45,11 @@
45
45
  "returning": true
46
46
  },
47
47
  "sql": {
48
+ "checkConstraint": true,
48
49
  "defaultInInsert": true,
49
50
  "enums": true,
51
+ "insertOnConflictSkip": true,
52
+ "insertOnConflictWithoutTarget": true,
50
53
  "lateral": true,
51
54
  "returning": true,
52
55
  "scalarList": true
@@ -56,7 +59,7 @@
56
59
  "meta": {},
57
60
  "_generated": {
58
61
  "warning": "⚠️ GENERATED FILE - DO NOT EDIT",
59
- "message": "This file is automatically generated by \"prisma-next contract emit\".",
60
- "regenerate": "To regenerate, run: prisma-next contract emit"
62
+ "message": "This file is automatically generated by \"prisma contract emit\".",
63
+ "regenerate": "To regenerate, run: prisma contract emit"
61
64
  }
62
65
  }
package/src/contract.ts CHANGED
@@ -1,23 +1,17 @@
1
1
  import { defineContract } from "@prisma/orm-postgres/contract-builder";
2
2
  import { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from "./core/constants";
3
- import {
4
- LTREE_ARRAY_STORAGE_TYPE,
5
- LTREE_ARRAY_NATIVE_TYPE,
6
- LTREE_NATIVE_TYPE,
7
- } from "./core/contract-space-constants";
3
+ import { LTREE_ARRAY_STORAGE_TYPE, LTREE_NATIVE_TYPE } from "./core/contract-space-constants";
8
4
 
9
5
  export const contract = defineContract({}, () => ({
10
6
  types: {
11
7
  [LTREE_NATIVE_TYPE]: {
12
8
  kind: "codec-instance",
13
9
  codecId: LTREE_CODEC_ID,
14
- nativeType: LTREE_NATIVE_TYPE,
15
10
  typeParams: {},
16
11
  },
17
12
  [LTREE_ARRAY_STORAGE_TYPE]: {
18
13
  kind: "codec-instance",
19
14
  codecId: LTREE_ARRAY_CODEC_ID,
20
- nativeType: LTREE_ARRAY_NATIVE_TYPE,
21
15
  typeParams: {},
22
16
  },
23
17
  },
@@ -1,21 +1,20 @@
1
1
  import type { AuthoringTypeNamespace } from "@prisma/orm-framework/components/authoring";
2
2
  import { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from "./constants";
3
- import { LTREE_ARRAY_NATIVE_TYPE, LTREE_NATIVE_TYPE } from "./contract-space-constants";
4
3
 
5
4
  export const ltreeAuthoringTypes = {
6
5
  ltree: {
7
6
  Ltree: {
8
7
  kind: "typeConstructor",
8
+ inferred: true,
9
9
  output: {
10
10
  codecId: LTREE_CODEC_ID,
11
- nativeType: LTREE_NATIVE_TYPE,
12
11
  },
13
12
  },
14
13
  LtreeArray: {
15
14
  kind: "typeConstructor",
15
+ inferred: true,
16
16
  output: {
17
17
  codecId: LTREE_ARRAY_CODEC_ID,
18
- nativeType: LTREE_ARRAY_NATIVE_TYPE,
19
18
  },
20
19
  },
21
20
  },
@@ -6,21 +6,19 @@ import {
6
6
  type ColumnHelperFor,
7
7
  type ColumnHelperForStrict,
8
8
  column,
9
- voidParamsSchema,
10
9
  } from "@prisma/orm-framework/components/codec";
11
10
  import type { ExtractCodecTypes, ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
12
11
  import {
13
12
  definePostgresCodecs,
14
13
  PostgresCodecDescriptor,
15
14
  } from "@prisma/orm-target-postgres/target/codec-descriptor";
16
- import type { StandardSchemaV1 } from "@standard-schema/spec";
17
15
  import {
18
16
  LTREE_ARRAY_CODEC_ID,
19
17
  LTREE_CODEC_ID,
20
18
  LTREE_MAX_LABEL_LENGTH,
21
19
  LTREE_MAX_LABELS,
22
20
  } from "./constants";
23
- import { LTREE_ARRAY_NATIVE_TYPE, LTREE_NATIVE_TYPE } from "./contract-space-constants";
21
+ import { ltreeArrayDataType, ltreeDataType } from "./data-types";
24
22
 
25
23
  const LABEL_PATTERN = /^[A-Za-z0-9_-]+$/;
26
24
 
@@ -79,17 +77,14 @@ export class LtreeCodec extends CodecImpl<
79
77
  }
80
78
 
81
79
  export class LtreeDescriptor extends PostgresCodecDescriptor<void> {
82
- protected override nativeType(): string {
83
- return LTREE_NATIVE_TYPE;
84
- }
85
80
  protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {
86
81
  // ltree's text form is already its canonical JSON string.
87
82
  return expression;
88
83
  }
84
+ override readonly dataType = ltreeDataType.id;
89
85
  override readonly codecId = LTREE_CODEC_ID;
90
86
  override readonly traits = ["equality", "order"] as const;
91
- override readonly targetTypes = [LTREE_NATIVE_TYPE] as const;
92
- override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;
87
+ override readonly paramsSchema = undefined;
93
88
  override renderOutputType(): string {
94
89
  return "string";
95
90
  }
@@ -101,8 +96,7 @@ export class LtreeDescriptor extends PostgresCodecDescriptor<void> {
101
96
 
102
97
  export const ltreeDescriptor = new LtreeDescriptor();
103
98
 
104
- export const ltree = () =>
105
- column(ltreeDescriptor.factory(), ltreeDescriptor.codecId, undefined, LTREE_NATIVE_TYPE);
99
+ export const ltree = () => column(ltreeDescriptor.factory(), ltreeDescriptor.codecId, undefined);
106
100
 
107
101
  ltree satisfies ColumnHelperFor<LtreeDescriptor>;
108
102
  ltree satisfies ColumnHelperForStrict<LtreeDescriptor>;
@@ -143,17 +137,14 @@ export class LtreeArrayCodec extends CodecImpl<
143
137
  }
144
138
 
145
139
  export class LtreeArrayDescriptor extends PostgresCodecDescriptor<void> {
146
- protected override nativeType(): string {
147
- return LTREE_ARRAY_NATIVE_TYPE;
148
- }
149
140
  protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {
150
141
  // ltree[] text form projects as a JSON string array already.
151
142
  return expression;
152
143
  }
144
+ override readonly dataType = ltreeArrayDataType.id;
153
145
  override readonly codecId = LTREE_ARRAY_CODEC_ID;
154
146
  override readonly traits = ["equality"] as const;
155
- override readonly targetTypes = [LTREE_ARRAY_NATIVE_TYPE] as const;
156
- override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;
147
+ override readonly paramsSchema = undefined;
157
148
  override renderOutputType(): string {
158
149
  return "readonly string[]";
159
150
  }
@@ -166,12 +157,7 @@ export class LtreeArrayDescriptor extends PostgresCodecDescriptor<void> {
166
157
  export const ltreeArrayDescriptor = new LtreeArrayDescriptor();
167
158
 
168
159
  export const ltreeArray = () =>
169
- column(
170
- ltreeArrayDescriptor.factory(),
171
- ltreeArrayDescriptor.codecId,
172
- undefined,
173
- LTREE_ARRAY_NATIVE_TYPE,
174
- );
160
+ column(ltreeArrayDescriptor.factory(), ltreeArrayDescriptor.codecId, undefined);
175
161
 
176
162
  ltreeArray satisfies ColumnHelperFor<LtreeArrayDescriptor>;
177
163
  ltreeArray satisfies ColumnHelperForStrict<LtreeArrayDescriptor>;
@@ -2,8 +2,6 @@ export const LTREE_SPACE_ID = "ltree" as const;
2
2
 
3
3
  export const LTREE_NATIVE_TYPE = "ltree" as const;
4
4
 
5
- export const LTREE_ARRAY_NATIVE_TYPE = "ltree[]" as const;
6
-
7
5
  /** Contract storage.types key — must be a valid identifier for contract emit. */
8
6
  export const LTREE_ARRAY_STORAGE_TYPE = "ltreeArray" as const;
9
7