prisma-ltree 0.5.0 → 0.6.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 +8 -8
- package/dist/{codec-types-BJE-5cwk.d.mts → codec-types-Ba5cQ3bc.d.mts} +15 -12
- package/dist/codec-types-Ba5cQ3bc.d.mts.map +1 -0
- package/dist/codec-types.d.mts +1 -1
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +236 -16
- package/dist/control.mjs.map +1 -1
- package/dist/{descriptor-meta-2In8FI1I.mjs → descriptor-meta-Cc6tmP54.mjs} +69 -35
- package/dist/descriptor-meta-Cc6tmP54.mjs.map +1 -0
- package/dist/pack.d.mts +1 -1
- package/dist/pack.mjs +1 -1
- package/dist/runtime.mjs +1 -1
- package/package.json +11 -10
- package/src/contract.d.ts +87 -20
- package/src/contract.json +22 -1
- package/src/contract.ts +21 -3
- package/src/core/codecs-validation.ts +31 -0
- package/src/core/codecs.ts +32 -55
- package/src/core/contract-space-constants.ts +11 -0
- package/src/core/data-types.ts +36 -2
- package/src/exports/control.ts +36 -1
- package/dist/codec-types-BJE-5cwk.d.mts.map +0 -1
- package/dist/descriptor-meta-2In8FI1I.mjs.map +0 -1
package/src/core/data-types.ts
CHANGED
|
@@ -2,28 +2,62 @@
|
|
|
2
2
|
* Data types this extension owns.
|
|
3
3
|
*
|
|
4
4
|
* `ltree` and `ltree[]` are PostgreSQL types the target does not register.
|
|
5
|
-
* A path's
|
|
5
|
+
* A path's stored form is its label text. An array's stored form is a
|
|
6
6
|
* JSON array of those texts. Both accept text the contract can already write.
|
|
7
7
|
* The texts are what a migration writes and what the catalog reports.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { DataType } from "@prisma/orm-framework/components/codec";
|
|
10
|
+
import type { DataType, DataTypeReader } from "@prisma/orm-framework/components/codec";
|
|
11
|
+
import { refuseJsonValue } from "@prisma/orm-framework/components/codec";
|
|
11
12
|
import { sqlDataType } from "@prisma/orm-family-sql/contract/data-type";
|
|
12
13
|
import { pgText } from "@prisma/orm-target-postgres/target/data-types";
|
|
14
|
+
import { assertValidLtree } from "./codecs-validation";
|
|
15
|
+
|
|
16
|
+
const readLtree: DataTypeReader = (json) => {
|
|
17
|
+
if (typeof json !== "string") {
|
|
18
|
+
return refuseJsonValue("ltree/ltree", "an ltree path string", json);
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
assertValidLtree(json);
|
|
22
|
+
} catch {
|
|
23
|
+
return refuseJsonValue("ltree/ltree", "a valid ltree path string", json);
|
|
24
|
+
}
|
|
25
|
+
return json;
|
|
26
|
+
};
|
|
13
27
|
|
|
14
28
|
export const ltreeDataType = sqlDataType("ltree/ltree", {
|
|
29
|
+
read: readLtree,
|
|
15
30
|
texts: [{ text: "ltree", written: true, catalog: true }],
|
|
16
31
|
casts: {
|
|
17
32
|
[pgText.id]: (value) => value,
|
|
18
33
|
},
|
|
19
34
|
});
|
|
20
35
|
|
|
36
|
+
const readLtreeArray: DataTypeReader = (json) => {
|
|
37
|
+
const expected = "an array of ltree path strings";
|
|
38
|
+
if (!Array.isArray(json)) {
|
|
39
|
+
return refuseJsonValue("ltree/ltree-array", expected, json);
|
|
40
|
+
}
|
|
41
|
+
for (const entry of json) {
|
|
42
|
+
if (typeof entry !== "string") {
|
|
43
|
+
return refuseJsonValue("ltree/ltree-array", expected, entry);
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
assertValidLtree(entry);
|
|
47
|
+
} catch {
|
|
48
|
+
return refuseJsonValue("ltree/ltree-array", expected, entry);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return json;
|
|
52
|
+
};
|
|
53
|
+
|
|
21
54
|
/**
|
|
22
55
|
* `sqlDataType` accepts parentheses in a type name and refuses square brackets.
|
|
23
56
|
* PostgreSQL writes this type as `ltree[]`, and `format_type` reports `ltree[]`.
|
|
24
57
|
* Declare the type first, then set that text so a migration and a catalog check use it.
|
|
25
58
|
*/
|
|
26
59
|
const ltreeArrayDeclared = sqlDataType("ltree/ltree-array", {
|
|
60
|
+
read: readLtreeArray,
|
|
27
61
|
listCast: {
|
|
28
62
|
of: [pgText.id],
|
|
29
63
|
cast: (elements) => [...elements],
|
package/src/exports/control.ts
CHANGED
|
@@ -7,10 +7,25 @@ import { contractSpaceFromJson } from "@prisma/orm-toolchain/migration-tools/spa
|
|
|
7
7
|
import type { SqlStorage } from "@prisma/orm-family-sql/contract/types";
|
|
8
8
|
import baselineMetadata from "../../migrations/20260619T2142_install_ltree/migration.json" with { type: "json" };
|
|
9
9
|
import baselineOps from "../../migrations/20260619T2142_install_ltree/ops.json" with { type: "json" };
|
|
10
|
+
import createMetadata from "../../migrations/20261111T1904_create_ltree_extension/migration.json" with { type: "json" };
|
|
11
|
+
import createOps from "../../migrations/20261111T1904_create_ltree_extension/ops.json" with { type: "json" };
|
|
12
|
+
import declareMetadata from "../../migrations/20261111T1905_declare_ltree_extension/migration.json" with { type: "json" };
|
|
13
|
+
import declareOps from "../../migrations/20261111T1905_declare_ltree_extension/ops.json" with { type: "json" };
|
|
14
|
+
import searchPathMetadata from "../../migrations/20261111T1908_find_ltree_on_search_path/migration.json" with { type: "json" };
|
|
15
|
+
import searchPathOps from "../../migrations/20261111T1908_find_ltree_on_search_path/ops.json" with { type: "json" };
|
|
16
|
+
import searchPathInstallMetadata from "../../migrations/20261111T1908_install_ltree_on_search_path/migration.json" with { type: "json" };
|
|
17
|
+
import searchPathInstallOps from "../../migrations/20261111T1908_install_ltree_on_search_path/ops.json" with { type: "json" };
|
|
10
18
|
import headRef from "../../migrations/refs/head.json" with { type: "json" };
|
|
11
19
|
import contractJson from "../contract.json" with { type: "json" };
|
|
12
20
|
import { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from "../core/constants";
|
|
13
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
LTREE_BASELINE_MIGRATION_NAME,
|
|
23
|
+
LTREE_CREATE_EXTENSION_MIGRATION_NAME,
|
|
24
|
+
LTREE_DECLARE_EXTENSION_MIGRATION_NAME,
|
|
25
|
+
LTREE_SEARCH_PATH_INSTALL_MIGRATION_NAME,
|
|
26
|
+
LTREE_SEARCH_PATH_MIGRATION_NAME,
|
|
27
|
+
LTREE_SPACE_ID,
|
|
28
|
+
} from "../core/contract-space-constants";
|
|
14
29
|
import { ltreePackMeta, ltreeQueryOperations } from "../core/descriptor-meta";
|
|
15
30
|
|
|
16
31
|
const ltreeControlPlaneHooks: CodecControlHooks = {
|
|
@@ -25,6 +40,26 @@ const ltreeContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({
|
|
|
25
40
|
metadata: baselineMetadata,
|
|
26
41
|
ops: baselineOps,
|
|
27
42
|
},
|
|
43
|
+
{
|
|
44
|
+
dirName: LTREE_DECLARE_EXTENSION_MIGRATION_NAME,
|
|
45
|
+
metadata: declareMetadata,
|
|
46
|
+
ops: declareOps,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
dirName: LTREE_CREATE_EXTENSION_MIGRATION_NAME,
|
|
50
|
+
metadata: createMetadata,
|
|
51
|
+
ops: createOps,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
dirName: LTREE_SEARCH_PATH_MIGRATION_NAME,
|
|
55
|
+
metadata: searchPathMetadata,
|
|
56
|
+
ops: searchPathOps,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
dirName: LTREE_SEARCH_PATH_INSTALL_MIGRATION_NAME,
|
|
60
|
+
metadata: searchPathInstallMetadata,
|
|
61
|
+
ops: searchPathInstallOps,
|
|
62
|
+
},
|
|
28
63
|
],
|
|
29
64
|
headRef,
|
|
30
65
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-BJE-5cwk.d.mts","names":[],"sources":["../src/core/constants.ts","../src/core/codecs.ts","../src/types/codec-types.ts"],"mappings":";;;;;;cAAa,cAAA;AAAA,cAEA,oBAAA;;;cCkDA,UAAA,SAAm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 -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-2In8FI1I.mjs","names":[],"sources":["../src/core/authoring.ts","../src/core/data-types.ts","../src/core/codecs.ts","../src/core/registry.ts","../src/core/descriptor-meta.ts"],"sourcesContent":["import type { AuthoringTypeNamespace } from \"@prisma/orm-framework/components/authoring\";\nimport { LTREE_ARRAY_CODEC_ID, LTREE_CODEC_ID } from \"./constants\";\n\nexport const ltreeAuthoringTypes = {\n ltree: {\n Ltree: {\n kind: \"typeConstructor\",\n inferred: true,\n output: {\n codecId: LTREE_CODEC_ID,\n },\n },\n LtreeArray: {\n kind: \"typeConstructor\",\n inferred: true,\n output: {\n codecId: LTREE_ARRAY_CODEC_ID,\n },\n },\n },\n} as const satisfies AuthoringTypeNamespace;\n","/**\n * Data types this extension owns.\n *\n * `ltree` and `ltree[]` are PostgreSQL types the target does not register.\n * A path's canonical form is its label text. An array's canonical form is a\n * JSON array of those texts. Both accept text the contract can already write.\n * The texts are what a migration writes and what the catalog reports.\n */\n\nimport type { DataType } from \"@prisma/orm-framework/components/codec\";\nimport { sqlDataType } from \"@prisma/orm-family-sql/contract/data-type\";\nimport { pgText } from \"@prisma/orm-target-postgres/target/data-types\";\n\nexport const ltreeDataType = sqlDataType(\"ltree/ltree\", {\n texts: [{ text: \"ltree\", written: true, catalog: true }],\n casts: {\n [pgText.id]: (value) => value,\n },\n});\n\n/**\n * `sqlDataType` accepts parentheses in a type name and refuses square brackets.\n * PostgreSQL writes this type as `ltree[]`, and `format_type` reports `ltree[]`.\n * Declare the type first, then set that text so a migration and a catalog check use it.\n */\nconst ltreeArrayDeclared = sqlDataType(\"ltree/ltree-array\", {\n listCast: {\n of: [pgText.id],\n cast: (elements) => [...elements],\n },\n});\n\nexport const ltreeArrayDataType = {\n ...ltreeArrayDeclared,\n sql: {\n ...ltreeArrayDeclared.sql,\n texts: [{ text: \"ltree[]\", written: true as const, catalog: true as const }],\n },\n} as typeof ltreeArrayDeclared;\n\nexport const ltreeDataTypes: readonly DataType[] = [ltreeDataType, ltreeArrayDataType];\n","import type { JsonValue } from \"@prisma/orm-framework/contract/types\";\nimport {\n type CodecCallContext,\n CodecImpl,\n type CodecInstanceContext,\n type ColumnHelperFor,\n type ColumnHelperForStrict,\n column,\n} from \"@prisma/orm-framework/components/codec\";\nimport type { ExtractCodecTypes, ProjectionExpr } from \"@prisma/orm-family-sql/relational-core/ast\";\nimport {\n definePostgresCodecs,\n PostgresCodecDescriptor,\n} from \"@prisma/orm-target-postgres/target/codec-descriptor\";\nimport {\n LTREE_ARRAY_CODEC_ID,\n LTREE_CODEC_ID,\n LTREE_MAX_LABEL_LENGTH,\n LTREE_MAX_LABELS,\n} from \"./constants\";\nimport { ltreeArrayDataType, ltreeDataType } from \"./data-types\";\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\nexport class LtreeDescriptor extends PostgresCodecDescriptor<void> {\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n // ltree's text form is already its canonical JSON string.\n return expression;\n }\n override readonly dataType = ltreeDataType.id;\n override readonly codecId = LTREE_CODEC_ID;\n override readonly traits = [\"equality\", \"order\"] as const;\n override readonly paramsSchema = undefined;\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 = () => column(ltreeDescriptor.factory(), ltreeDescriptor.codecId, undefined);\n\nltree satisfies ColumnHelperFor<LtreeDescriptor>;\nltree satisfies ColumnHelperForStrict<LtreeDescriptor>;\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 PostgresCodecDescriptor<void> {\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n // ltree[] text form projects as a JSON string array already.\n return expression;\n }\n override readonly dataType = ltreeArrayDataType.id;\n override readonly codecId = LTREE_ARRAY_CODEC_ID;\n override readonly traits = [\"equality\"] as const;\n override readonly paramsSchema = undefined;\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(ltreeArrayDescriptor.factory(), ltreeArrayDescriptor.codecId, undefined);\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 = definePostgresCodecs(Object.values(codecDescriptorMap));\n","import { buildCodecDescriptorRegistry } from \"@prisma/orm-family-sql/relational-core/codec-descriptor-registry\";\nimport type { CodecDescriptorRegistry } from \"@prisma/orm-family-sql/relational-core/query-lane-context\";\nimport { codecDescriptors } from \"./codecs\";\n\nexport const ltreeCodecRegistry: CodecDescriptorRegistry =\n buildCodecDescriptorRegistry(codecDescriptors);\n","import type { AnyExpression } from \"@prisma/orm-family-sql/relational-core/ast\";\nimport {\n buildOperation,\n type CodecExpression,\n codecOf,\n type Expression,\n toExpr,\n} from \"@prisma/orm-family-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 { ltreeDataTypes } from \"./data-types\";\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 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 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 template: `{{self}} ${operator} {{arg0}}`,\n },\n });\n };\n\n const patternOp = (\n method: string,\n operator: string,\n castType: string,\n self: CodecExpression<typeof LTREE_CODEC_ID, boolean, CT>,\n arg: unknown,\n many = false,\n ): BoolReturn => {\n const selfCodec = codecOf(self);\n return buildOperation({\n method,\n args: [\n toExpr(self, selfCodec),\n toExpr(arg, many ? { codecId: TEXT_CODEC_ID, many: true } : { codecId: TEXT_CODEC_ID }),\n ],\n returns: BOOL_RETURN,\n lowering: {\n targetFamily: \"sql\",\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\", 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\", 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) => patternOp(\"matchesLquery\", \"~\", \"lquery\", self, pattern),\n },\n matchesLqueryArray: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, patterns) =>\n patternOp(\"matchesLqueryArray\", \"?\", \"lquery[]\", self, patterns, true),\n },\n matchesLtxtquery: {\n self: { codecId: LTREE_CODEC_ID },\n impl: (self, query) => patternOp(\"matchesLtxtquery\", \"@\", \"ltxtquery\", 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 // `lca(ltree[])` — array-receiver form (ADR-001, ADR-005). Named `lcaAll`\n // because prisma-next keys operations by name only (`createOperationRegistry`\n // throws on a duplicate); `lca` is already the variadic scalar method on\n // `pg/ltree@1`. Declares `nullable: false` for parity with the Tier 3\n // first-match ops even though PG returns NULL for an empty/NULL `ltree[]`\n // (see the empty-array integration test) — a family-wide gap, not specific\n // to `lcaAll`.\n lcaAll: {\n self: { codecId: LTREE_ARRAY_CODEC_ID },\n impl: (self): LtreeReturn =>\n funcOp(\"lcaAll\", \"lca\", LTREE_RETURN, [toExpr(self, codecOf(self))]),\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 dataTypes: ltreeDataTypes,\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 },\n} as const;\n\nexport const ltreePackMeta: typeof ltreePackMetaBase & {\n readonly __codecTypes?: CodecTypes;\n} = ltreePackMetaBase;\n"],"mappings":";;;;;;;;AAGA,MAAa,sBAAsB,EACjC,OAAO;CACL,OAAO;EACL,MAAM;EACN,UAAU;EACV,QAAQ,EACN,SAAS,eACX;CACF;CACA,YAAY;EACV,MAAM;EACN,UAAU;EACV,QAAQ,EACN,SAAS,qBACX;CACF;AACF,EACF;;;ACPA,MAAa,gBAAgB,YAAY,eAAe;CACtD,OAAO,CAAC;EAAE,MAAM;EAAS,SAAS;EAAM,SAAS;CAAK,CAAC;CACvD,OAAO,GACJ,OAAO,MAAM,UAAU,MAC1B;AACF,CAAC;;;;;;AAOD,MAAM,qBAAqB,YAAY,qBAAqB,EAC1D,UAAU;CACR,IAAI,CAAC,OAAO,EAAE;CACd,OAAO,aAAa,CAAC,GAAG,QAAQ;AAClC,EACF,CAAC;AAED,MAAa,qBAAqB;CAChC,GAAG;CACH,KAAK;EACH,GAAG,mBAAmB;EACtB,OAAO,CAAC;GAAE,MAAM;GAAW,SAAS;GAAe,SAAS;EAAc,CAAC;CAC7E;AACF;AAEA,MAAa,iBAAsC,CAAC,eAAe,kBAAkB;;;AClBrF,MAAM,gBAAgB;AAEtB,SAAgB,iBAAiB,OAAyC;CACxE,IAAI,OAAO,UAAU,UACnB,MAAM,IAAI,MAAM,8BAA8B;CAEhD,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MAAM,+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