prisma-ltree 0.0.1 → 0.1.1

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.
Files changed (47) hide show
  1. package/README.md +194 -3
  2. package/dist/codec-types-mZn-cIh9.d.mts +73 -0
  3. package/dist/codec-types-mZn-cIh9.d.mts.map +1 -0
  4. package/dist/codec-types.d.mts +2 -0
  5. package/dist/codec-types.mjs +1 -0
  6. package/dist/column-types.d.mts +8 -0
  7. package/dist/column-types.d.mts.map +1 -0
  8. package/dist/column-types.mjs +18 -0
  9. package/dist/column-types.mjs.map +1 -0
  10. package/dist/contract-space-constants-Da9EC668.mjs +15 -0
  11. package/dist/contract-space-constants-Da9EC668.mjs.map +1 -0
  12. package/dist/control.d.mts +7 -0
  13. package/dist/control.d.mts.map +1 -0
  14. package/dist/control.mjs +139 -0
  15. package/dist/control.mjs.map +1 -0
  16. package/dist/descriptor-meta-B84muAZG.mjs +345 -0
  17. package/dist/descriptor-meta-B84muAZG.mjs.map +1 -0
  18. package/dist/operation-types-CP6jqHAZ.d.mts +184 -0
  19. package/dist/operation-types-CP6jqHAZ.d.mts.map +1 -0
  20. package/dist/operation-types.d.mts +2 -0
  21. package/dist/operation-types.mjs +1 -0
  22. package/dist/pack.d.mts +73 -0
  23. package/dist/pack.d.mts.map +1 -0
  24. package/dist/pack.mjs +2 -0
  25. package/dist/runtime.d.mts +11 -0
  26. package/dist/runtime.d.mts.map +1 -0
  27. package/dist/runtime.mjs +22 -0
  28. package/dist/runtime.mjs.map +1 -0
  29. package/package.json +80 -11
  30. package/src/contract.d.ts +115 -0
  31. package/src/contract.json +61 -0
  32. package/src/contract.ts +27 -0
  33. package/src/core/authoring.ts +22 -0
  34. package/src/core/codecs.ts +178 -0
  35. package/src/core/constants.ts +7 -0
  36. package/src/core/contract-space-constants.ts +14 -0
  37. package/src/core/descriptor-meta.ts +346 -0
  38. package/src/core/registry.ts +6 -0
  39. package/src/exports/codec-types.ts +1 -0
  40. package/src/exports/column-types.ts +17 -0
  41. package/src/exports/control.ts +55 -0
  42. package/src/exports/operation-types.ts +1 -0
  43. package/src/exports/pack.ts +1 -0
  44. package/src/exports/runtime.ts +27 -0
  45. package/src/types/codec-types.ts +7 -0
  46. package/src/types/operation-types.ts +156 -0
  47. package/index.js +0 -3
@@ -0,0 +1,345 @@
1
+ import { a as LTREE_ARRAY_CODEC_ID, c as LTREE_MAX_LABEL_LENGTH, o as LTREE_CODEC_ID, r as LTREE_NATIVE_TYPE, s as LTREE_MAX_LABELS, t as LTREE_ARRAY_NATIVE_TYPE } from "./contract-space-constants-Da9EC668.mjs";
2
+ import { buildOperation, codecOf, toExpr } from "@prisma-next/sql-relational-core/expression";
3
+ import { buildCodecDescriptorRegistry } from "@prisma-next/sql-relational-core/codec-descriptor-registry";
4
+ import { CodecDescriptorImpl, CodecImpl, voidParamsSchema } from "@prisma-next/framework-components/codec";
5
+ //#region src/core/authoring.ts
6
+ const ltreeAuthoringTypes = { ltree: {
7
+ Ltree: {
8
+ kind: "typeConstructor",
9
+ output: {
10
+ codecId: LTREE_CODEC_ID,
11
+ nativeType: LTREE_NATIVE_TYPE
12
+ }
13
+ },
14
+ LtreeArray: {
15
+ kind: "typeConstructor",
16
+ output: {
17
+ codecId: LTREE_ARRAY_CODEC_ID,
18
+ nativeType: LTREE_ARRAY_NATIVE_TYPE
19
+ }
20
+ }
21
+ } };
22
+ //#endregion
23
+ //#region src/core/codecs.ts
24
+ const LABEL_PATTERN = /^[A-Za-z0-9_-]+$/;
25
+ function assertValidLtree(value) {
26
+ if (typeof value !== "string") throw new Error("ltree value must be a string");
27
+ if (value.length === 0) throw new Error("ltree value must not be empty");
28
+ const labels = value.split(".");
29
+ if (labels.length > 65535) throw new Error(`ltree path exceeds max labels: got ${labels.length}, max ${LTREE_MAX_LABELS}`);
30
+ for (const label of labels) {
31
+ if (label.length === 0) throw new Error(`ltree label must not be empty in path "${value}"`);
32
+ if (label.length > 1e3) throw new Error(`ltree label exceeds max length: got ${label.length}, max ${LTREE_MAX_LABEL_LENGTH}`);
33
+ if (!LABEL_PATTERN.test(label)) throw new Error(`ltree label "${label}" contains invalid characters; allowed: alphanumeric, underscore, hyphen`);
34
+ }
35
+ }
36
+ var LtreeCodec = class extends CodecImpl {
37
+ async encode(value, _ctx) {
38
+ assertValidLtree(value);
39
+ return value;
40
+ }
41
+ async decode(wire, _ctx) {
42
+ return wire;
43
+ }
44
+ encodeJson(value) {
45
+ assertValidLtree(value);
46
+ return value;
47
+ }
48
+ decodeJson(json) {
49
+ assertValidLtree(json);
50
+ return json;
51
+ }
52
+ };
53
+ const LTREE_META = { db: { sql: { postgres: { nativeType: LTREE_NATIVE_TYPE } } } };
54
+ var LtreeDescriptor = class extends CodecDescriptorImpl {
55
+ codecId = LTREE_CODEC_ID;
56
+ traits = ["equality", "order"];
57
+ targetTypes = [LTREE_NATIVE_TYPE];
58
+ meta = LTREE_META;
59
+ paramsSchema = voidParamsSchema;
60
+ renderOutputType() {
61
+ return "string";
62
+ }
63
+ factory() {
64
+ const shared = new LtreeCodec(this);
65
+ return () => shared;
66
+ }
67
+ };
68
+ const ltreeDescriptor = new LtreeDescriptor();
69
+ const LTREE_ARRAY_META = { db: { sql: { postgres: { nativeType: LTREE_ARRAY_NATIVE_TYPE } } } };
70
+ var LtreeArrayCodec = class extends CodecImpl {
71
+ async encode(value, _ctx) {
72
+ for (const entry of value) assertValidLtree(entry);
73
+ return value;
74
+ }
75
+ async decode(wire, _ctx) {
76
+ return wire;
77
+ }
78
+ encodeJson(value) {
79
+ for (const entry of value) assertValidLtree(entry);
80
+ return [...value];
81
+ }
82
+ decodeJson(json) {
83
+ if (!Array.isArray(json)) return [];
84
+ return json.map((entry) => {
85
+ assertValidLtree(entry);
86
+ return String(entry);
87
+ });
88
+ }
89
+ };
90
+ var LtreeArrayDescriptor = class extends CodecDescriptorImpl {
91
+ codecId = LTREE_ARRAY_CODEC_ID;
92
+ traits = ["equality"];
93
+ targetTypes = [LTREE_ARRAY_NATIVE_TYPE];
94
+ meta = LTREE_ARRAY_META;
95
+ paramsSchema = voidParamsSchema;
96
+ renderOutputType() {
97
+ return "readonly string[]";
98
+ }
99
+ factory() {
100
+ const shared = new LtreeArrayCodec(this);
101
+ return () => shared;
102
+ }
103
+ };
104
+ const codecDescriptorMap = {
105
+ ltree: ltreeDescriptor,
106
+ ltreeArray: new LtreeArrayDescriptor()
107
+ };
108
+ //#endregion
109
+ //#region src/core/registry.ts
110
+ const ltreeCodecRegistry = buildCodecDescriptorRegistry(Object.values(codecDescriptorMap));
111
+ //#endregion
112
+ //#region src/core/descriptor-meta.ts
113
+ const BOOL_RETURN = {
114
+ codecId: "pg/bool@1",
115
+ nullable: false
116
+ };
117
+ const LTREE_RETURN = {
118
+ codecId: "pg/ltree@1",
119
+ nullable: false
120
+ };
121
+ const INT_RETURN = {
122
+ codecId: "pg/int4@1",
123
+ nullable: false
124
+ };
125
+ const TEXT_RETURN = {
126
+ codecId: "pg/text@1",
127
+ nullable: false
128
+ };
129
+ const TEXT_CODEC_ID = "pg/text@1";
130
+ const TEXT_ARRAY_CODEC_ID = "pg/text-array@1";
131
+ const INT_CODEC_ID = "pg/int4@1";
132
+ /**
133
+ * Build a function-style operation whose SQL is `fnName(self, arg0, arg1, ...)`.
134
+ * The template's placeholder count is derived from the actual argument list, so
135
+ * one helper covers fixed-arity functions (`nlevel`, `subltree`), optional-arg
136
+ * overloads (`subpath`, `index`), and the variadic `lca` (see ADR-001). `args`
137
+ * already carries each value through `toExpr` with its codec; `args[0]` is the
138
+ * `self` receiver.
139
+ */
140
+ function funcOp(method, fnName, returns, args) {
141
+ return buildOperation({
142
+ method,
143
+ args,
144
+ returns,
145
+ lowering: {
146
+ targetFamily: "sql",
147
+ strategy: "function",
148
+ template: `${fnName}(${args.map((_, i) => i === 0 ? "{{self}}" : `{{arg${i - 1}}}`).join(", ")})`
149
+ }
150
+ });
151
+ }
152
+ function ltreeQueryOperations() {
153
+ const hierarchyOp = (method, operator, self, other) => {
154
+ const selfCodec = codecOf(self);
155
+ return buildOperation({
156
+ method,
157
+ args: [toExpr(self, selfCodec), toExpr(other, selfCodec)],
158
+ returns: BOOL_RETURN,
159
+ lowering: {
160
+ targetFamily: "sql",
161
+ strategy: "function",
162
+ template: `{{self}} ${operator} {{arg0}}`
163
+ }
164
+ });
165
+ };
166
+ const patternOp = (method, operator, castType, argCodecId, self, arg) => {
167
+ return buildOperation({
168
+ method,
169
+ args: [toExpr(self, codecOf(self)), toExpr(arg, { codecId: argCodecId })],
170
+ returns: BOOL_RETURN,
171
+ lowering: {
172
+ targetFamily: "sql",
173
+ strategy: "function",
174
+ template: `{{self}} ${operator} ({{arg0}})::${castType}`
175
+ }
176
+ });
177
+ };
178
+ const concatOp = (method, template, args) => buildOperation({
179
+ method,
180
+ args,
181
+ returns: LTREE_RETURN,
182
+ lowering: {
183
+ targetFamily: "sql",
184
+ strategy: "function",
185
+ template
186
+ }
187
+ });
188
+ const firstMatchOp = (method, operator, self, arg, argCodecId, castType) => {
189
+ const selfCodec = codecOf(self);
190
+ const template = castType ? `{{self}} ${operator} ({{arg0}})::${castType}` : `{{self}} ${operator} {{arg0}}`;
191
+ return buildOperation({
192
+ method,
193
+ args: [toExpr(self, selfCodec), toExpr(arg, { codecId: argCodecId })],
194
+ returns: LTREE_RETURN,
195
+ lowering: {
196
+ targetFamily: "sql",
197
+ strategy: "function",
198
+ template
199
+ }
200
+ });
201
+ };
202
+ return {
203
+ isAncestorOf: {
204
+ self: { codecId: LTREE_CODEC_ID },
205
+ impl: (self, other) => hierarchyOp("isAncestorOf", "@>", self, other)
206
+ },
207
+ isDescendantOf: {
208
+ self: { codecId: LTREE_CODEC_ID },
209
+ impl: (self, other) => hierarchyOp("isDescendantOf", "<@", self, other)
210
+ },
211
+ matchesLquery: {
212
+ self: { codecId: LTREE_CODEC_ID },
213
+ impl: (self, pattern) => patternOp("matchesLquery", "~", "lquery", TEXT_CODEC_ID, self, pattern)
214
+ },
215
+ matchesLqueryArray: {
216
+ self: { codecId: LTREE_CODEC_ID },
217
+ impl: (self, patterns) => patternOp("matchesLqueryArray", "?", "lquery[]", TEXT_ARRAY_CODEC_ID, self, patterns)
218
+ },
219
+ matchesLtxtquery: {
220
+ self: { codecId: LTREE_CODEC_ID },
221
+ impl: (self, query) => patternOp("matchesLtxtquery", "@", "ltxtquery", TEXT_CODEC_ID, self, query)
222
+ },
223
+ nlevel: {
224
+ self: { codecId: LTREE_CODEC_ID },
225
+ impl: (self) => funcOp("nlevel", "nlevel", INT_RETURN, [toExpr(self, codecOf(self))])
226
+ },
227
+ subltree: {
228
+ self: { codecId: LTREE_CODEC_ID },
229
+ impl: (self, start, end) => funcOp("subltree", "subltree", LTREE_RETURN, [
230
+ toExpr(self, codecOf(self)),
231
+ toExpr(start, { codecId: INT_CODEC_ID }),
232
+ toExpr(end, { codecId: INT_CODEC_ID })
233
+ ])
234
+ },
235
+ subpath: {
236
+ self: { codecId: LTREE_CODEC_ID },
237
+ impl: (self, offset, len) => {
238
+ const head = [toExpr(self, codecOf(self)), toExpr(offset, { codecId: INT_CODEC_ID })];
239
+ return funcOp("subpath", "subpath", LTREE_RETURN, len === void 0 ? head : [...head, toExpr(len, { codecId: INT_CODEC_ID })]);
240
+ }
241
+ },
242
+ indexOf: {
243
+ self: { codecId: LTREE_CODEC_ID },
244
+ impl: (self, other, offset) => {
245
+ const selfCodec = codecOf(self);
246
+ const head = [toExpr(self, selfCodec), toExpr(other, selfCodec)];
247
+ return funcOp("indexOf", "index", INT_RETURN, offset === void 0 ? head : [...head, toExpr(offset, { codecId: INT_CODEC_ID })]);
248
+ }
249
+ },
250
+ lca: {
251
+ self: { codecId: LTREE_CODEC_ID },
252
+ impl: (self, other, ...rest) => {
253
+ const selfCodec = codecOf(self);
254
+ return funcOp("lca", "lca", LTREE_RETURN, [
255
+ toExpr(self, selfCodec),
256
+ toExpr(other, selfCodec),
257
+ ...rest.map((p) => toExpr(p, selfCodec))
258
+ ]);
259
+ }
260
+ },
261
+ concat: {
262
+ self: { codecId: LTREE_CODEC_ID },
263
+ impl: (self, other) => {
264
+ const selfCodec = codecOf(self);
265
+ return concatOp("concat", "{{self}} || {{arg0}}", [toExpr(self, selfCodec), toExpr(other, selfCodec)]);
266
+ }
267
+ },
268
+ concatText: {
269
+ self: { codecId: LTREE_CODEC_ID },
270
+ impl: (self, label) => concatOp("concatText", "{{self}} || ({{arg0}})::text", [toExpr(self, codecOf(self)), toExpr(label, { codecId: TEXT_CODEC_ID })])
271
+ },
272
+ prependText: {
273
+ self: { codecId: LTREE_CODEC_ID },
274
+ impl: (self, prefix) => concatOp("prependText", "({{arg0}})::text || {{self}}", [toExpr(self, codecOf(self)), toExpr(prefix, { codecId: TEXT_CODEC_ID })])
275
+ },
276
+ toText: {
277
+ self: { codecId: LTREE_CODEC_ID },
278
+ impl: (self) => funcOp("toText", "ltree2text", TEXT_RETURN, [toExpr(self, codecOf(self))])
279
+ },
280
+ toLtree: {
281
+ self: { codecId: TEXT_CODEC_ID },
282
+ impl: (self) => funcOp("toLtree", "text2ltree", LTREE_RETURN, [toExpr(self, codecOf(self))])
283
+ },
284
+ firstAncestorOf: {
285
+ self: { codecId: LTREE_ARRAY_CODEC_ID },
286
+ impl: (self, other) => firstMatchOp("firstAncestorOf", "?@>", self, other, LTREE_CODEC_ID)
287
+ },
288
+ firstDescendantOf: {
289
+ self: { codecId: LTREE_ARRAY_CODEC_ID },
290
+ impl: (self, other) => firstMatchOp("firstDescendantOf", "?<@", self, other, LTREE_CODEC_ID)
291
+ },
292
+ firstMatchLquery: {
293
+ self: { codecId: LTREE_ARRAY_CODEC_ID },
294
+ impl: (self, pattern) => firstMatchOp("firstMatchLquery", "?~", self, pattern, TEXT_CODEC_ID, "lquery")
295
+ },
296
+ firstMatchLtxtquery: {
297
+ self: { codecId: LTREE_ARRAY_CODEC_ID },
298
+ impl: (self, query) => firstMatchOp("firstMatchLtxtquery", "?@", self, query, TEXT_CODEC_ID, "ltxtquery")
299
+ }
300
+ };
301
+ }
302
+ const ltreePackMeta = {
303
+ kind: "extension",
304
+ id: "ltree",
305
+ familyId: "sql",
306
+ targetId: "postgres",
307
+ version: "0.1.0",
308
+ capabilities: { postgres: { "ltree.path": true } },
309
+ authoring: { type: ltreeAuthoringTypes },
310
+ types: {
311
+ codecTypes: {
312
+ codecDescriptors: Array.from(ltreeCodecRegistry.values()),
313
+ import: {
314
+ package: "prisma-ltree/codec-types",
315
+ named: "CodecTypes",
316
+ alias: "LtreeTypes"
317
+ },
318
+ typeImports: [{
319
+ package: "prisma-ltree/codec-types",
320
+ named: "Ltree",
321
+ alias: "Ltree"
322
+ }]
323
+ },
324
+ queryOperationTypes: { import: {
325
+ package: "prisma-ltree/operation-types",
326
+ named: "QueryOperationTypes",
327
+ alias: "LtreeQueryOperationTypes"
328
+ } },
329
+ storage: [{
330
+ typeId: LTREE_CODEC_ID,
331
+ familyId: "sql",
332
+ targetId: "postgres",
333
+ nativeType: LTREE_NATIVE_TYPE
334
+ }, {
335
+ typeId: LTREE_ARRAY_CODEC_ID,
336
+ familyId: "sql",
337
+ targetId: "postgres",
338
+ nativeType: LTREE_ARRAY_NATIVE_TYPE
339
+ }]
340
+ }
341
+ };
342
+ //#endregion
343
+ export { ltreeQueryOperations as n, ltreeCodecRegistry as r, ltreePackMeta as t };
344
+
345
+ //# sourceMappingURL=descriptor-meta-B84muAZG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor-meta-B84muAZG.mjs","names":[],"sources":["../src/core/authoring.ts","../src/core/codecs.ts","../src/core/registry.ts","../src/core/descriptor-meta.ts"],"sourcesContent":["import type { AuthoringTypeNamespace } from \"@prisma-next/framework-components/authoring\";\nimport { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from \"./constants\";\nimport { LTREE_ARRAY_NATIVE_TYPE, LTREE_NATIVE_TYPE } from \"./contract-space-constants\";\n\nexport const ltreeAuthoringTypes = {\n ltree: {\n Ltree: {\n kind: \"typeConstructor\",\n output: {\n codecId: LTREE_CODEC_ID,\n nativeType: LTREE_NATIVE_TYPE,\n },\n },\n LtreeArray: {\n kind: \"typeConstructor\",\n output: {\n codecId: LTREE_ARRAY_CODEC_ID,\n nativeType: LTREE_ARRAY_NATIVE_TYPE,\n },\n },\n },\n} as const satisfies AuthoringTypeNamespace;\n","import type { JsonValue } from \"@prisma-next/contract/types\";\nimport {\n type AnyCodecDescriptor,\n type CodecCallContext,\n CodecDescriptorImpl,\n CodecImpl,\n type CodecInstanceContext,\n type ColumnHelperFor,\n type ColumnHelperForStrict,\n column,\n voidParamsSchema,\n} from \"@prisma-next/framework-components/codec\";\nimport type { ExtractCodecTypes } from \"@prisma-next/sql-relational-core/ast\";\nimport type { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport {\n LTREE_ARRAY_CODEC_ID,\n LTREE_CODEC_ID,\n LTREE_MAX_LABEL_LENGTH,\n LTREE_MAX_LABELS,\n} from \"./constants\";\nimport { LTREE_ARRAY_NATIVE_TYPE, LTREE_NATIVE_TYPE } from \"./contract-space-constants\";\n\nconst LABEL_PATTERN = /^[A-Za-z0-9_-]+$/;\n\nexport function assertValidLtree(value: unknown): asserts value is string {\n if (typeof value !== \"string\") {\n throw new Error(\"ltree value must be a string\");\n }\n if (value.length === 0) {\n throw new Error(\"ltree value must not be empty\");\n }\n const labels = value.split(\".\");\n if (labels.length > LTREE_MAX_LABELS) {\n throw new Error(`ltree path exceeds max labels: got ${labels.length}, max ${LTREE_MAX_LABELS}`);\n }\n for (const label of labels) {\n if (label.length === 0) {\n throw new Error(`ltree label must not be empty in path \"${value}\"`);\n }\n if (label.length > LTREE_MAX_LABEL_LENGTH) {\n throw new Error(\n `ltree label exceeds max length: got ${label.length}, max ${LTREE_MAX_LABEL_LENGTH}`,\n );\n }\n if (!LABEL_PATTERN.test(label)) {\n throw new Error(\n `ltree label \"${label}\" contains invalid characters; allowed: alphanumeric, underscore, hyphen`,\n );\n }\n }\n}\n\nexport class LtreeCodec extends CodecImpl<\n typeof LTREE_CODEC_ID,\n readonly [\"equality\", \"order\"],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n assertValidLtree(value);\n return value;\n }\n\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n\n encodeJson(value: string): JsonValue {\n assertValidLtree(value);\n return value;\n }\n\n decodeJson(json: JsonValue): string {\n assertValidLtree(json);\n return json;\n }\n}\n\nconst LTREE_META = { db: { sql: { postgres: { nativeType: LTREE_NATIVE_TYPE } } } } as const;\n\nexport class LtreeDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = LTREE_CODEC_ID;\n override readonly traits = [\"equality\", \"order\"] as const;\n override readonly targetTypes = [LTREE_NATIVE_TYPE] as const;\n override readonly meta = LTREE_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderOutputType(): string {\n return \"string\";\n }\n override factory(): (ctx: CodecInstanceContext) => LtreeCodec {\n const shared = new LtreeCodec(this);\n return () => shared;\n }\n}\n\nexport const ltreeDescriptor = new LtreeDescriptor();\n\nexport const ltree = () =>\n column(ltreeDescriptor.factory(), ltreeDescriptor.codecId, undefined, LTREE_NATIVE_TYPE);\n\nltree satisfies ColumnHelperFor<LtreeDescriptor>;\nltree satisfies ColumnHelperForStrict<LtreeDescriptor>;\n\nconst LTREE_ARRAY_META = {\n db: { sql: { postgres: { nativeType: LTREE_ARRAY_NATIVE_TYPE } } },\n} as const;\n\nexport class LtreeArrayCodec extends CodecImpl<\n typeof LTREE_ARRAY_CODEC_ID,\n readonly [\"equality\"],\n readonly string[],\n readonly string[]\n> {\n async encode(value: readonly string[], _ctx: CodecCallContext): Promise<readonly string[]> {\n for (const entry of value) {\n assertValidLtree(entry);\n }\n return value;\n }\n\n async decode(wire: readonly string[], _ctx: CodecCallContext): Promise<readonly string[]> {\n return wire;\n }\n\n encodeJson(value: readonly string[]): JsonValue {\n for (const entry of value) {\n assertValidLtree(entry);\n }\n return [...value];\n }\n\n decodeJson(json: JsonValue): readonly string[] {\n if (!Array.isArray(json)) {\n return [];\n }\n return json.map((entry) => {\n assertValidLtree(entry);\n return String(entry);\n });\n }\n}\n\nexport class LtreeArrayDescriptor extends CodecDescriptorImpl<void> {\n override readonly codecId = LTREE_ARRAY_CODEC_ID;\n override readonly traits = [\"equality\"] as const;\n override readonly targetTypes = [LTREE_ARRAY_NATIVE_TYPE] as const;\n override readonly meta = LTREE_ARRAY_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderOutputType(): string {\n return \"readonly string[]\";\n }\n override factory(): (ctx: CodecInstanceContext) => LtreeArrayCodec {\n const shared = new LtreeArrayCodec(this);\n return () => shared;\n }\n}\n\nexport const ltreeArrayDescriptor = new LtreeArrayDescriptor();\n\nexport const ltreeArray = () =>\n column(\n ltreeArrayDescriptor.factory(),\n ltreeArrayDescriptor.codecId,\n undefined,\n LTREE_ARRAY_NATIVE_TYPE,\n );\n\nltreeArray satisfies ColumnHelperFor<LtreeArrayDescriptor>;\nltreeArray satisfies ColumnHelperForStrict<LtreeArrayDescriptor>;\n\nconst codecDescriptorMap = {\n ltree: ltreeDescriptor,\n ltreeArray: ltreeArrayDescriptor,\n} as const;\n\nexport type CodecTypes = ExtractCodecTypes<typeof codecDescriptorMap>;\n\nexport const codecDescriptors: readonly AnyCodecDescriptor[] = Object.values(codecDescriptorMap);\n","import { buildCodecDescriptorRegistry } from \"@prisma-next/sql-relational-core/codec-descriptor-registry\";\nimport type { CodecDescriptorRegistry } from \"@prisma-next/sql-relational-core/query-lane-context\";\nimport { codecDescriptors } from \"./codecs\";\n\nexport const ltreeCodecRegistry: CodecDescriptorRegistry =\n buildCodecDescriptorRegistry(codecDescriptors);\n","import type { AnyExpression } from \"@prisma-next/sql-relational-core/ast\";\nimport {\n buildOperation,\n type CodecExpression,\n codecOf,\n type Expression,\n toExpr,\n} from \"@prisma-next/sql-relational-core/expression\";\nimport type { CodecTypes } from \"../types/codec-types\";\nimport type { QueryOperationTypes } from \"../types/operation-types\";\nimport { ltreeAuthoringTypes } from \"./authoring\";\nimport { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from \"./constants\";\nimport { LTREE_ARRAY_NATIVE_TYPE, LTREE_NATIVE_TYPE } from \"./contract-space-constants\";\nimport { ltreeCodecRegistry } from \"./registry\";\n\ntype CodecTypesBase = Record<string, { readonly input: unknown; readonly output: unknown }>;\n\ntype BoolReturn = Expression<{ readonly codecId: \"pg/bool@1\"; readonly nullable: false }>;\ntype LtreeReturn = Expression<{ readonly codecId: \"pg/ltree@1\"; readonly nullable: false }>;\ntype IntReturn = Expression<{ readonly codecId: \"pg/int4@1\"; readonly nullable: false }>;\ntype TextReturn = Expression<{ readonly codecId: \"pg/text@1\"; readonly nullable: false }>;\n\nconst BOOL_RETURN = { codecId: \"pg/bool@1\", nullable: false } as const;\nconst LTREE_RETURN = { codecId: \"pg/ltree@1\", nullable: false } as const;\nconst INT_RETURN = { codecId: \"pg/int4@1\", nullable: false } as const;\nconst TEXT_RETURN = { codecId: \"pg/text@1\", nullable: false } as const;\nconst TEXT_CODEC_ID = \"pg/text@1\" as const;\nconst TEXT_ARRAY_CODEC_ID = \"pg/text-array@1\" as const;\nconst INT_CODEC_ID = \"pg/int4@1\" as const;\n\n/**\n * Build a function-style operation whose SQL is `fnName(self, arg0, arg1, ...)`.\n * The template's placeholder count is derived from the actual argument list, so\n * one helper covers fixed-arity functions (`nlevel`, `subltree`), optional-arg\n * overloads (`subpath`, `index`), and the variadic `lca` (see ADR-001). `args`\n * already carries each value through `toExpr` with its codec; `args[0]` is the\n * `self` receiver.\n */\nfunction funcOp<C extends string>(\n method: string,\n fnName: string,\n returns: { readonly codecId: C; readonly nullable: false },\n args: readonly [AnyExpression, ...AnyExpression[]],\n): Expression<{ readonly codecId: C; readonly nullable: false }> {\n const placeholders = args.map((_, i) => (i === 0 ? \"{{self}}\" : `{{arg${i - 1}}}`)).join(\", \");\n return buildOperation({\n method,\n args,\n returns,\n lowering: {\n targetFamily: \"sql\",\n strategy: \"function\",\n template: `${fnName}(${placeholders})`,\n },\n });\n}\n\nexport function ltreeQueryOperations<CT extends CodecTypesBase>(): QueryOperationTypes<CT> {\n // Hierarchy operators compare two `ltree` values; the user argument shares the\n // column's `pg/ltree@1` codec. Pattern-match operators take a query/pattern\n // string (or `string[]`) that is NOT an ltree — it is bound as text and cast\n // in-template to `lquery` / `lquery[]` / `ltxtquery` (the validated-string-param\n // approach; verified executable under PGlite).\n const hierarchyOp = (\n method: string,\n operator: string,\n self: CodecExpression<typeof LTREE_CODEC_ID, boolean, CT>,\n other: CodecExpression<typeof LTREE_CODEC_ID, boolean, CT>,\n ): BoolReturn => {\n const selfCodec = codecOf(self);\n return buildOperation({\n method,\n args: [toExpr(self, selfCodec), toExpr(other, selfCodec)],\n returns: BOOL_RETURN,\n lowering: {\n targetFamily: \"sql\",\n strategy: \"function\",\n template: `{{self}} ${operator} {{arg0}}`,\n },\n });\n };\n\n const patternOp = (\n method: string,\n operator: string,\n castType: string,\n argCodecId: typeof TEXT_CODEC_ID | typeof TEXT_ARRAY_CODEC_ID,\n self: CodecExpression<typeof LTREE_CODEC_ID, boolean, CT>,\n arg: unknown,\n ): BoolReturn => {\n const selfCodec = codecOf(self);\n return buildOperation({\n method,\n args: [toExpr(self, selfCodec), toExpr(arg, { codecId: argCodecId })],\n returns: BOOL_RETURN,\n lowering: {\n targetFamily: \"sql\",\n strategy: \"function\",\n template: `{{self}} ${operator} ({{arg0}})::${castType}`,\n },\n });\n };\n\n // Concatenation operators produce a new ltree. `concat` joins two ltree paths\n // (`{{self}} || {{arg0}}`); `concatText`/`prependText` splice a text label onto\n // the right/left. The text operand binds as `pg/text@1` and is cast in-template\n // (PG resolves the `||` overload from the cast). `prependText` places `{{self}}`\n // second because the ltree receiver is the RIGHT operand of `text || ltree`;\n // `args[0]` is still `self` (the renderer binds by placeholder name, not order).\n const concatOp = (\n method: string,\n template: string,\n args: readonly [AnyExpression, ...AnyExpression[]],\n ): LtreeReturn =>\n buildOperation({\n method,\n args,\n returns: LTREE_RETURN,\n lowering: { targetFamily: \"sql\", strategy: \"function\", template },\n });\n\n // Tier 3 — first-match operators on an `ltree[]` receiver (ADR-003).\n const firstMatchOp = (\n method: string,\n operator: string,\n self: CodecExpression<typeof LTREE_ARRAY_CODEC_ID, boolean, CT>,\n arg: unknown,\n argCodecId: typeof LTREE_CODEC_ID | typeof TEXT_CODEC_ID,\n castType?: string,\n ): LtreeReturn => {\n const selfCodec = codecOf(self);\n const template = castType\n ? `{{self}} ${operator} ({{arg0}})::${castType}`\n : `{{self}} ${operator} {{arg0}}`;\n return buildOperation({\n method,\n args: [toExpr(self, selfCodec), toExpr(arg, { codecId: argCodecId })],\n returns: LTREE_RETURN,\n lowering: { targetFamily: \"sql\", strategy: \"function\", template },\n });\n };\n\n return {\n isAncestorOf: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, other) => hierarchyOp(\"isAncestorOf\", \"@>\", self, other),\n },\n isDescendantOf: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, other) => hierarchyOp(\"isDescendantOf\", \"<@\", self, other),\n },\n matchesLquery: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, pattern) =>\n patternOp(\"matchesLquery\", \"~\", \"lquery\", TEXT_CODEC_ID, self, pattern),\n },\n matchesLqueryArray: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, patterns) =>\n patternOp(\"matchesLqueryArray\", \"?\", \"lquery[]\", TEXT_ARRAY_CODEC_ID, self, patterns),\n },\n matchesLtxtquery: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, query) =>\n patternOp(\"matchesLtxtquery\", \"@\", \"ltxtquery\", TEXT_CODEC_ID, self, query),\n },\n nlevel: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self): IntReturn =>\n funcOp(\"nlevel\", \"nlevel\", INT_RETURN, [toExpr(self, codecOf(self))]),\n },\n subltree: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, start, end): LtreeReturn =>\n funcOp(\"subltree\", \"subltree\", LTREE_RETURN, [\n toExpr(self, codecOf(self)),\n toExpr(start, { codecId: INT_CODEC_ID }),\n toExpr(end, { codecId: INT_CODEC_ID }),\n ]),\n },\n // `subpath(self, offset, len?)` — `len` omitted lowers to the 2-arg overload.\n subpath: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, offset, len): LtreeReturn => {\n const head: readonly [AnyExpression, AnyExpression] = [\n toExpr(self, codecOf(self)),\n toExpr(offset, { codecId: INT_CODEC_ID }),\n ];\n return funcOp(\n \"subpath\",\n \"subpath\",\n LTREE_RETURN,\n len === undefined ? head : [...head, toExpr(len, { codecId: INT_CODEC_ID })],\n );\n },\n },\n // `index(self, other, offset?)` — `offset` omitted lowers to the 2-arg overload.\n indexOf: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, other, offset): IntReturn => {\n const selfCodec = codecOf(self);\n const head: readonly [AnyExpression, AnyExpression] = [\n toExpr(self, selfCodec),\n toExpr(other, selfCodec),\n ];\n return funcOp(\n \"indexOf\",\n \"index\",\n INT_RETURN,\n offset === undefined ? head : [...head, toExpr(offset, { codecId: INT_CODEC_ID })],\n );\n },\n },\n // `lca(self, other, ...rest)` — variadic longest-common-ancestor (ADR-001).\n // PostgreSQL has no single-arg `lca`, so `other` is required (2–8 paths).\n lca: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, other, ...rest): LtreeReturn => {\n const selfCodec = codecOf(self);\n return funcOp(\"lca\", \"lca\", LTREE_RETURN, [\n toExpr(self, selfCodec),\n toExpr(other, selfCodec),\n ...rest.map((p) => toExpr(p, selfCodec)),\n ]);\n },\n },\n // Tier 2 — concatenation (`||`).\n concat: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, other): LtreeReturn => {\n const selfCodec = codecOf(self);\n return concatOp(\"concat\", \"{{self}} || {{arg0}}\", [\n toExpr(self, selfCodec),\n toExpr(other, selfCodec),\n ]);\n },\n },\n concatText: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, label): LtreeReturn =>\n concatOp(\"concatText\", \"{{self}} || ({{arg0}})::text\", [\n toExpr(self, codecOf(self)),\n toExpr(label, { codecId: TEXT_CODEC_ID }),\n ]),\n },\n // `text || ltree` — the ltree receiver is the right operand (ADR-002).\n prependText: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, prefix): LtreeReturn =>\n concatOp(\"prependText\", \"({{arg0}})::text || {{self}}\", [\n toExpr(self, codecOf(self)),\n toExpr(prefix, { codecId: TEXT_CODEC_ID }),\n ]),\n },\n // Tier 2 — conversion.\n toText: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self): TextReturn =>\n funcOp(\"toText\", \"ltree2text\", TEXT_RETURN, [toExpr(self, codecOf(self))]),\n },\n // `text2ltree(text)` — rooted on `pg/text@1` (the only reachable form of the\n // free-function `text2ltree`; see ADR-002). Surfaces as `.toLtree()` on text.\n toLtree: {\n self: { codecId: TEXT_CODEC_ID },\n impl: (self): LtreeReturn =>\n funcOp(\"toLtree\", \"text2ltree\", LTREE_RETURN, [toExpr(self, codecOf(self))]),\n },\n // Tier 3 — array first-match operators (ADR-003).\n firstAncestorOf: {\n self: { codecId: LTREE_ARRAY_CODEC_ID },\n impl: (self, other) => firstMatchOp(\"firstAncestorOf\", \"?@>\", self, other, LTREE_CODEC_ID),\n },\n firstDescendantOf: {\n self: { codecId: LTREE_ARRAY_CODEC_ID },\n impl: (self, other) => firstMatchOp(\"firstDescendantOf\", \"?<@\", self, other, LTREE_CODEC_ID),\n },\n firstMatchLquery: {\n self: { codecId: LTREE_ARRAY_CODEC_ID },\n impl: (self, pattern) =>\n firstMatchOp(\"firstMatchLquery\", \"?~\", self, pattern, TEXT_CODEC_ID, \"lquery\"),\n },\n firstMatchLtxtquery: {\n self: { codecId: LTREE_ARRAY_CODEC_ID },\n impl: (self, query) =>\n firstMatchOp(\"firstMatchLtxtquery\", \"?@\", self, query, TEXT_CODEC_ID, \"ltxtquery\"),\n },\n };\n}\n\nconst ltreePackMetaBase = {\n kind: \"extension\",\n id: \"ltree\",\n familyId: \"sql\",\n targetId: \"postgres\",\n version: \"0.1.0\",\n capabilities: {\n postgres: {\n \"ltree.path\": true,\n },\n },\n authoring: {\n type: ltreeAuthoringTypes,\n },\n types: {\n codecTypes: {\n codecDescriptors: Array.from(ltreeCodecRegistry.values()),\n import: {\n package: \"prisma-ltree/codec-types\",\n named: \"CodecTypes\",\n alias: \"LtreeTypes\",\n },\n typeImports: [\n {\n package: \"prisma-ltree/codec-types\",\n named: \"Ltree\",\n alias: \"Ltree\",\n },\n ],\n },\n queryOperationTypes: {\n import: {\n package: \"prisma-ltree/operation-types\",\n named: \"QueryOperationTypes\",\n alias: \"LtreeQueryOperationTypes\",\n },\n },\n storage: [\n {\n typeId: LTREE_CODEC_ID,\n familyId: \"sql\",\n targetId: \"postgres\",\n nativeType: LTREE_NATIVE_TYPE,\n },\n {\n typeId: LTREE_ARRAY_CODEC_ID,\n familyId: \"sql\",\n targetId: \"postgres\",\n nativeType: LTREE_ARRAY_NATIVE_TYPE,\n },\n ],\n },\n} as const;\n\nexport const ltreePackMeta: typeof ltreePackMetaBase & {\n readonly __codecTypes?: CodecTypes;\n} = ltreePackMetaBase;\n"],"mappings":";;;;;AAIA,MAAa,sBAAsB,EACjC,OAAO;CACL,OAAO;EACL,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,YAAY;EACV,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;AACF,EACF;;;ACCA,MAAM,gBAAgB;AAEtB,SAAgB,iBAAiB,OAAyC;CACxE,IAAI,OAAO,UAAU,UACnB,MAAM,IAAI,MAAM,8BAA8B;CAEhD,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MAAM,+BAA+B;CAEjD,MAAM,SAAS,MAAM,MAAM,GAAG;CAC9B,IAAI,OAAO,SAAA,OACT,MAAM,IAAI,MAAM,sCAAsC,OAAO,OAAO,QAAQ,k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qB;GACtC,OAAO,MAAM,UAAU,aAAa,qBAAqB,OAAO,MAAM,OAAO,cAAc;EAC7F;EACA,kBAAkB;GAChB,MAAM,EAAE,SAAS,qBAAqB;GACtC,OAAO,MAAM,YACX,aAAa,oBAAoB,MAAM,MAAM,SAAS,eAAe,QAAQ;EACjF;EACA,qBAAqB;GACnB,MAAM,EAAE,SAAS,qBAAqB;GACtC,OAAO,MAAM,UACX,aAAa,uBAAuB,MAAM,MAAM,OAAO,eAAe,WAAW;EACrF;CACF;AACF;AAwDA,MAAa,gBAET;CAvDF,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,cAAc,EACZ,UAAU,EACR,cAAc,KAChB,EACF;CACA,WAAW,EACT,MAAM,oBACR;CACA,OAAO;EACL,YAAY;GACV,kBAAkB,MAAM,KAAK,mBAAmB,OAAO,CAAC;GACxD,QAAQ;IACN,SAAS;IACT,OAAO;IACP,OAAO;GACT;GACA,aAAa,CACX;IACE,SAAS;IACT,OAAO;IACP,OAAO;GACT,CACF;EACF;EACA,qBAAqB,EACnB,QAAQ;GACN,SAAS;GACT,OAAO;GACP,OAAO;EACT,EACF;EACA,SAAS,CACP;GACE,QAAQ;GACR,UAAU;GACV,UAAU;GACV,YAAY;EACd,GACA;GACE,QAAQ;GACR,UAAU;GACV,UAAU;GACV,YAAY;EACd,CACF;CACF;AAKE"}
@@ -0,0 +1,184 @@
1
+ import { CodecExpression, Expression } from "@prisma-next/sql-relational-core/expression";
2
+ import { SqlQueryOperationTypes } from "@prisma-next/sql-contract/types";
3
+
4
+ //#region src/types/operation-types.d.ts
5
+ type CodecTypesBase = Record<string, {
6
+ readonly input: unknown;
7
+ readonly output: unknown;
8
+ }>;
9
+ type QueryOperationTypes<CT extends CodecTypesBase> = SqlQueryOperationTypes<CT, {
10
+ readonly isAncestorOf: {
11
+ readonly self: {
12
+ readonly codecId: "pg/ltree@1";
13
+ };
14
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
15
+ readonly codecId: "pg/bool@1";
16
+ readonly nullable: false;
17
+ }>;
18
+ };
19
+ readonly isDescendantOf: {
20
+ readonly self: {
21
+ readonly codecId: "pg/ltree@1";
22
+ };
23
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
24
+ readonly codecId: "pg/bool@1";
25
+ readonly nullable: false;
26
+ }>;
27
+ };
28
+ readonly matchesLquery: {
29
+ readonly self: {
30
+ readonly codecId: "pg/ltree@1";
31
+ };
32
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, pattern: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
33
+ readonly codecId: "pg/bool@1";
34
+ readonly nullable: false;
35
+ }>;
36
+ };
37
+ readonly matchesLqueryArray: {
38
+ readonly self: {
39
+ readonly codecId: "pg/ltree@1";
40
+ };
41
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, patterns: CodecExpression<"pg/text-array@1", boolean, CT>) => Expression<{
42
+ readonly codecId: "pg/bool@1";
43
+ readonly nullable: false;
44
+ }>;
45
+ };
46
+ readonly matchesLtxtquery: {
47
+ readonly self: {
48
+ readonly codecId: "pg/ltree@1";
49
+ };
50
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, query: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
51
+ readonly codecId: "pg/bool@1";
52
+ readonly nullable: false;
53
+ }>;
54
+ };
55
+ readonly nlevel: {
56
+ readonly self: {
57
+ readonly codecId: "pg/ltree@1";
58
+ };
59
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
60
+ readonly codecId: "pg/int4@1";
61
+ readonly nullable: false;
62
+ }>;
63
+ };
64
+ readonly subltree: {
65
+ readonly self: {
66
+ readonly codecId: "pg/ltree@1";
67
+ };
68
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, start: CodecExpression<"pg/int4@1", boolean, CT>, end: CodecExpression<"pg/int4@1", boolean, CT>) => Expression<{
69
+ readonly codecId: "pg/ltree@1";
70
+ readonly nullable: false;
71
+ }>;
72
+ };
73
+ readonly subpath: {
74
+ readonly self: {
75
+ readonly codecId: "pg/ltree@1";
76
+ };
77
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, offset: CodecExpression<"pg/int4@1", boolean, CT>, len?: CodecExpression<"pg/int4@1", boolean, CT>) => Expression<{
78
+ readonly codecId: "pg/ltree@1";
79
+ readonly nullable: false;
80
+ }>;
81
+ };
82
+ readonly indexOf: {
83
+ readonly self: {
84
+ readonly codecId: "pg/ltree@1";
85
+ };
86
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>, offset?: CodecExpression<"pg/int4@1", boolean, CT>) => Expression<{
87
+ readonly codecId: "pg/int4@1";
88
+ readonly nullable: false;
89
+ }>;
90
+ };
91
+ readonly lca: {
92
+ readonly self: {
93
+ readonly codecId: "pg/ltree@1";
94
+ };
95
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>, ...rest: ReadonlyArray<CodecExpression<"pg/ltree@1", boolean, CT>>) => Expression<{
96
+ readonly codecId: "pg/ltree@1";
97
+ readonly nullable: false;
98
+ }>;
99
+ };
100
+ readonly concat: {
101
+ readonly self: {
102
+ readonly codecId: "pg/ltree@1";
103
+ };
104
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
105
+ readonly codecId: "pg/ltree@1";
106
+ readonly nullable: false;
107
+ }>;
108
+ };
109
+ readonly concatText: {
110
+ readonly self: {
111
+ readonly codecId: "pg/ltree@1";
112
+ };
113
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, label: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
114
+ readonly codecId: "pg/ltree@1";
115
+ readonly nullable: false;
116
+ }>;
117
+ };
118
+ readonly prependText: {
119
+ readonly self: {
120
+ readonly codecId: "pg/ltree@1";
121
+ };
122
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>, prefix: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
123
+ readonly codecId: "pg/ltree@1";
124
+ readonly nullable: false;
125
+ }>;
126
+ };
127
+ readonly toText: {
128
+ readonly self: {
129
+ readonly codecId: "pg/ltree@1";
130
+ };
131
+ readonly impl: (self: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
132
+ readonly codecId: "pg/text@1";
133
+ readonly nullable: false;
134
+ }>;
135
+ };
136
+ readonly toLtree: {
137
+ readonly self: {
138
+ readonly codecId: "pg/text@1";
139
+ };
140
+ readonly impl: (self: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
141
+ readonly codecId: "pg/ltree@1";
142
+ readonly nullable: false;
143
+ }>;
144
+ };
145
+ readonly firstAncestorOf: {
146
+ readonly self: {
147
+ readonly codecId: "pg/ltree-array@1";
148
+ };
149
+ readonly impl: (self: CodecExpression<"pg/ltree-array@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
150
+ readonly codecId: "pg/ltree@1";
151
+ readonly nullable: false;
152
+ }>;
153
+ };
154
+ readonly firstDescendantOf: {
155
+ readonly self: {
156
+ readonly codecId: "pg/ltree-array@1";
157
+ };
158
+ readonly impl: (self: CodecExpression<"pg/ltree-array@1", boolean, CT>, other: CodecExpression<"pg/ltree@1", boolean, CT>) => Expression<{
159
+ readonly codecId: "pg/ltree@1";
160
+ readonly nullable: false;
161
+ }>;
162
+ };
163
+ readonly firstMatchLquery: {
164
+ readonly self: {
165
+ readonly codecId: "pg/ltree-array@1";
166
+ };
167
+ readonly impl: (self: CodecExpression<"pg/ltree-array@1", boolean, CT>, pattern: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
168
+ readonly codecId: "pg/ltree@1";
169
+ readonly nullable: false;
170
+ }>;
171
+ };
172
+ readonly firstMatchLtxtquery: {
173
+ readonly self: {
174
+ readonly codecId: "pg/ltree-array@1";
175
+ };
176
+ readonly impl: (self: CodecExpression<"pg/ltree-array@1", boolean, CT>, query: CodecExpression<"pg/text@1", boolean, CT>) => Expression<{
177
+ readonly codecId: "pg/ltree@1";
178
+ readonly nullable: false;
179
+ }>;
180
+ };
181
+ }>;
182
+ //#endregion
183
+ export { QueryOperationTypes as t };
184
+ //# sourceMappingURL=operation-types-CP6jqHAZ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-types-CP6jqHAZ.d.mts","names":[],"sources":["../src/types/operation-types.ts"],"mappings":";;;;KAGK,cAAA,GAAiB,MAAM;EAAA,SAAoB,KAAA;EAAA,SAAyB,MAAA;AAAA;AAAA,KAE7D,mBAAA,YAA+B,cAAA,IAAkB,sBAAA,CAC3D,EAAA;EAAA,SAEW,YAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,wBAAuC,EAAA,GAC7C,KAAA,EAAO,eAAA,wBAAuC,EAAA,MAC3C,UAAA;MAAA,SAAsB,OAAA;MAAA,SAA+B,QAAA;IAAA;EAAA;EAAA,SAEnD,cAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,wBAAuC,EAAA,GAC7C,KAAA,EAAO,eAAA,wBAAuC,EAAA,MAC3C,UAAA;MAAA,SAAsB,OAAA;MAAA,SAA+B,QAAA;IAAA;EAAA;EAAA,SAKnD,aAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,wBAAuC,EAAA,GAC7C,OAAA,EAAS,eAAA,uBAAsC,EAAA,MAC5C,UAAA;MAAA,SAAsB,OAAA;MAAA,SAA+B,Q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0 +1 @@
1
+ export {};
@@ -0,0 +1,73 @@
1
+ import { t as CodecTypes } from "./codec-types-mZn-cIh9.mjs";
2
+ //#region src/core/descriptor-meta.d.ts
3
+ declare const ltreePackMetaBase: {
4
+ readonly kind: "extension";
5
+ readonly id: "ltree";
6
+ readonly familyId: "sql";
7
+ readonly targetId: "postgres";
8
+ readonly version: "0.1.0";
9
+ readonly capabilities: {
10
+ readonly postgres: {
11
+ readonly "ltree.path": true;
12
+ };
13
+ };
14
+ readonly authoring: {
15
+ readonly type: {
16
+ readonly ltree: {
17
+ readonly Ltree: {
18
+ readonly kind: "typeConstructor";
19
+ readonly output: {
20
+ readonly codecId: "pg/ltree@1";
21
+ readonly nativeType: "ltree";
22
+ };
23
+ };
24
+ readonly LtreeArray: {
25
+ readonly kind: "typeConstructor";
26
+ readonly output: {
27
+ readonly codecId: "pg/ltree-array@1";
28
+ readonly nativeType: "ltree[]";
29
+ };
30
+ };
31
+ };
32
+ };
33
+ };
34
+ readonly types: {
35
+ readonly codecTypes: {
36
+ readonly codecDescriptors: import("@prisma-next/framework-components/codec").CodecDescriptor<unknown>[];
37
+ readonly import: {
38
+ readonly package: "prisma-ltree/codec-types";
39
+ readonly named: "CodecTypes";
40
+ readonly alias: "LtreeTypes";
41
+ };
42
+ readonly typeImports: readonly [{
43
+ readonly package: "prisma-ltree/codec-types";
44
+ readonly named: "Ltree";
45
+ readonly alias: "Ltree";
46
+ }];
47
+ };
48
+ readonly queryOperationTypes: {
49
+ readonly import: {
50
+ readonly package: "prisma-ltree/operation-types";
51
+ readonly named: "QueryOperationTypes";
52
+ readonly alias: "LtreeQueryOperationTypes";
53
+ };
54
+ };
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
+ };
67
+ };
68
+ declare const ltreePackMeta: typeof ltreePackMetaBase & {
69
+ readonly __codecTypes?: CodecTypes;
70
+ };
71
+ //#endregion
72
+ export { ltreePackMeta as default };
73
+ //# sourceMappingURL=pack.d.mts.map