@prisma/orm-target-postgres 8.0.0-rc.24-dev.39 → 8.0.0-rc.24-dev.41
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/{adapter-VDAs5CMq-OezO60C5.mjs → adapter-CHlJgR4S-CLUPSnvo.mjs} +3 -3
- package/dist/{adapter-VDAs5CMq-OezO60C5.mjs.map → adapter-CHlJgR4S-CLUPSnvo.mjs.map} +1 -1
- package/dist/adapter.mjs +2 -2
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{authoring-4dCWsSXg-DeIEoQWg.mjs → authoring-ZsHi4vLr-qbZ1hNzY.mjs} +3 -3
- package/dist/{authoring-4dCWsSXg-DeIEoQWg.mjs.map → authoring-ZsHi4vLr-qbZ1hNzY.mjs.map} +1 -1
- package/dist/{contract-contributions-DG0aJRRu-31YCQkp-.mjs → contract-contributions-BB4GLsqV-DRI0-5Oy.mjs} +19 -10
- package/dist/contract-contributions-BB4GLsqV-DRI0-5Oy.mjs.map +1 -0
- package/dist/{contract-free-dQ4A6kPg.mjs → contract-free-C74Twi_E.mjs} +3 -3
- package/dist/{contract-free-dQ4A6kPg.mjs.map → contract-free-C74Twi_E.mjs.map} +1 -1
- package/dist/{control-policy-Crcjg7Vz-39_fO8yR.mjs → control-policy-Ckz2Fs57-C98YTOWU.mjs} +21 -8
- package/dist/control-policy-Ckz2Fs57-C98YTOWU.mjs.map +1 -0
- package/dist/{ddl-Cy_8QS23-D9EVihrI.mjs → ddl-BcqT3JRx-Dz0WRW0c.mjs} +3 -3
- package/dist/{ddl-Cy_8QS23-D9EVihrI.mjs.map → ddl-BcqT3JRx-Dz0WRW0c.mjs.map} +1 -1
- package/dist/{descriptor-meta-DwXEu6Ap-qDhyaRK4.mjs → descriptor-meta-CqWmMocA-D_Sj3QrO.mjs} +3 -3
- package/dist/{descriptor-meta-DwXEu6Ap-qDhyaRK4.mjs.map → descriptor-meta-CqWmMocA-D_Sj3QrO.mjs.map} +1 -1
- package/dist/{descriptor-meta-CakMYWwZ-DSQNCwWB.mjs → descriptor-meta-D49elEeZ-Bx0EB8FX.mjs} +4 -4
- package/dist/{descriptor-meta-CakMYWwZ-DSQNCwWB.mjs.map → descriptor-meta-D49elEeZ-Bx0EB8FX.mjs.map} +1 -1
- package/dist/{diff-database-schema-CVmwyjFf-DSWPpd4M.mjs → diff-database-schema-LHXykgph-DoYVYqfq.mjs} +15 -20
- package/dist/diff-database-schema-LHXykgph-DoYVYqfq.mjs.map +1 -0
- package/dist/{infer-psl-contract-DgQutzGt-C1wN72ZC.mjs → infer-psl-contract-C12P-2OG-ChFgcM6f.mjs} +14 -5
- package/dist/infer-psl-contract-C12P-2OG-ChFgcM6f.mjs.map +1 -0
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{op-factory-call-DvezqqJx-KBDyNT08.mjs → op-factory-call-BQOeT_F--DpdYzN0o.mjs} +5 -5
- package/dist/{op-factory-call-DvezqqJx-KBDyNT08.mjs.map → op-factory-call-BQOeT_F--DpdYzN0o.mjs.map} +1 -1
- package/dist/{planner-D2T46plG-BChGUTOA.mjs → planner-UNJid9ms-DiphUfCo.mjs} +12 -12
- package/dist/planner-UNJid9ms-DiphUfCo.mjs.map +1 -0
- package/dist/{planner-produced-postgres-migration-BLKk9Vaz-CsUhcKp1.mjs → planner-produced-postgres-migration-0n4ABKFA-Cu07sYKL.mjs} +5 -5
- package/dist/{planner-produced-postgres-migration-BLKk9Vaz-CsUhcKp1.mjs.map → planner-produced-postgres-migration-0n4ABKFA-Cu07sYKL.mjs.map} +1 -1
- package/dist/{planner-sql-checks-CzxowQml-moHPNh20.mjs → planner-sql-checks-DE7POy4E-BAVOBp_Q.mjs} +3 -3
- package/dist/{planner-sql-checks-CzxowQml-moHPNh20.mjs.map → planner-sql-checks-DE7POy4E-BAVOBp_Q.mjs.map} +1 -1
- package/dist/{postgres-contract-view-DhDzWNCN-BA5OpwhY.mjs → postgres-contract-view-CCbDZeIo-CK9z1Hw9.mjs} +4 -4
- package/dist/{postgres-contract-view-DhDzWNCN-BA5OpwhY.mjs.map → postgres-contract-view-CCbDZeIo-CK9z1Hw9.mjs.map} +1 -1
- package/dist/{postgres-migration-DEa-g6j1-CoG3QOV3.mjs → postgres-migration-BZ4z5KJ6-Cmya-r8H.mjs} +12 -12
- package/dist/postgres-migration-BZ4z5KJ6-Cmya-r8H.mjs.map +1 -0
- package/dist/{postgres-schema-CIfq1AjC-CGiMjtSX.mjs → postgres-schema-BaGmKymi-WHJQsmeb.mjs} +8 -3
- package/dist/postgres-schema-BaGmKymi-WHJQsmeb.mjs.map +1 -0
- package/dist/{prisma7-binding-BRPindAK.mjs → prisma7-binding-D9c8koix.mjs} +4 -4
- package/dist/{prisma7-binding-BRPindAK.mjs.map → prisma7-binding-D9c8koix.mjs.map} +1 -1
- package/dist/{render-ops-Bl1R5cz0-CFshOROt.mjs → render-ops-Owjb6xFw-ClGtnwWZ.mjs} +3 -3
- package/dist/{render-ops-Bl1R5cz0-CFshOROt.mjs.map → render-ops-Owjb6xFw-ClGtnwWZ.mjs.map} +1 -1
- package/dist/{render-typescript-B-Igkk6D-CQ-WlBmb.mjs → render-typescript-kNKf8www-Cyz2V7o5.mjs} +3 -3
- package/dist/{render-typescript-B-Igkk6D-CQ-WlBmb.mjs.map → render-typescript-kNKf8www-Cyz2V7o5.mjs.map} +1 -1
- package/dist/{resolve-ddl-schema-C2KTxEX3-D8Jd9Rx1.mjs → resolve-ddl-schema-DjC64uGi-CDs0tX1m.mjs} +3 -3
- package/dist/{resolve-ddl-schema-C2KTxEX3-D8Jd9Rx1.mjs.map → resolve-ddl-schema-DjC64uGi-CDs0tX1m.mjs.map} +1 -1
- package/dist/runtime-BArZXVRj.mjs.map +1 -1
- package/dist/target.mjs +18 -18
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.mjs +10 -10
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +1 -1
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.mjs +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__render-typescript.mjs +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__types.mjs +1 -1
- package/package.json +10 -10
- package/dist/contract-contributions-DG0aJRRu-31YCQkp-.mjs.map +0 -1
- package/dist/control-policy-Crcjg7Vz-39_fO8yR.mjs.map +0 -1
- package/dist/diff-database-schema-CVmwyjFf-DSWPpd4M.mjs.map +0 -1
- package/dist/infer-psl-contract-DgQutzGt-C1wN72ZC.mjs.map +0 -1
- package/dist/planner-D2T46plG-BChGUTOA.mjs.map +0 -1
- package/dist/postgres-migration-DEa-g6j1-CoG3QOV3.mjs.map +0 -1
- package/dist/postgres-schema-CIfq1AjC-CGiMjtSX.mjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { et as postgresDataTypes } from "./data-types-DgYRia-g-B_BFlAC3.mjs";
|
|
2
2
|
import { i as createPostgresCodecRegistryWithBuiltins } from "./codec-registry-FvoD6sJj-ClHgHbyf.mjs";
|
|
3
3
|
import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-Bj41PrUl-BDN4jKm9.mjs";
|
|
4
|
-
import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./contract-contributions-
|
|
4
|
+
import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./contract-contributions-BB4GLsqV-DRI0-5Oy.mjs";
|
|
5
5
|
import { isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
|
|
6
6
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
8
|
-
//#region ../../../3-targets/postgres/2-adapter/dist/adapter-
|
|
8
|
+
//#region ../../../3-targets/postgres/2-adapter/dist/adapter-CHlJgR4S.mjs
|
|
9
9
|
var PostgresAdapterImpl = class {
|
|
10
10
|
familyId = "sql";
|
|
11
11
|
targetId = "postgres";
|
|
@@ -86,4 +86,4 @@ function createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup, d
|
|
|
86
86
|
//#endregion
|
|
87
87
|
export { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
|
|
88
88
|
|
|
89
|
-
//# sourceMappingURL=adapter-
|
|
89
|
+
//# sourceMappingURL=adapter-CHlJgR4S-CLUPSnvo.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-
|
|
1
|
+
{"version":3,"file":"adapter-CHlJgR4S-CLUPSnvo.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/adapter-CHlJgR4S.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-Bj41PrUl.mjs\";\nimport { n as PostgresControlAdapter, r as postgresAdapterCapabilities } from \"./contract-contributions-BB4GLsqV.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { postgresDataTypes } from \"@internal/target-postgres/data-types\";\n//#region src/core/adapter.ts\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tdataTypeLookup;\n\tconstructor(codecRegistry, dataTypeLookup, declaredDataTypes, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry, dataTypeLookup, declaredDataTypes);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: postgresAdapterCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst dataTypes = assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}, {\n\t\tid: \"createPostgresAdapter\",\n\t\tdataTypes: options?.dataTypes ?? []\n\t}]);\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors, dataTypes.lookup);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypes.lookup, dataTypes.declared.map(({ type }) => type), options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup, declaredDataTypes) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup, declaredDataTypes));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-CHlJgR4S.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA;CACA,YAAY,eAAe,gBAAgB,mBAAmB,WAAW;EACxE,KAAK,gBAAgB;EACrB,KAAK,iBAAiB;EACtB,MAAM,iBAAiB,IAAI,uBAAuB,eAAe,gBAAgB,iBAAiB;EA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AC;CACnC,CAAC,CAAC;CACF,MAAM,gBAAgB,wCAAwC,SAAS,kBAAkB,UAAU,MAAM;CACzG,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,UAAU,QAAQ,UAAU,SAAS,KAAK,EAAE,WAAW,IAAI,GAAG,SAAS,SAAS,CAAC;AAC9I;AACA,SAAS,uCAAuC,eAAe,gBAAgB,mBAAmB;CACjG,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,gBAAgB,iBAAiB,CAAC;AAC/F"}
|
package/dist/adapter.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as qualifyName, o as quoteIdentifier, r as escapeLiteral } from "./sql-utils-ClKAaUlZ-BdjnkJvV.mjs";
|
|
2
2
|
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup } from "./codec-registry-FvoD6sJj-ClHgHbyf.mjs";
|
|
3
3
|
import { n as renderLoweredSql } from "./sql-renderer-Bj41PrUl-BDN4jKm9.mjs";
|
|
4
|
-
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as PostgresControlAdapter } from "./contract-contributions-
|
|
5
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-
|
|
4
|
+
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as PostgresControlAdapter } from "./contract-contributions-BB4GLsqV-DRI0-5Oy.mjs";
|
|
5
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-CHlJgR4S-CLUPSnvo.mjs";
|
|
6
6
|
import { A as varcharColumn, C as timestampStringColumn, D as timestamptzTemporalColumn, E as timestamptzStringColumn, O as timetzColumn, S as timestampJsDateColumn, T as timestamptzJsDateColumn, _ as rawColumn, a as dateStringColumn, b as timeTemporalColumn, c as float8Column, d as int8BigIntColumn, f as intervalPartsColumn, g as plainJsonColumn, h as numericStringColumn, i as charColumn, k as varbitColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as intervalStringColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as textColumn, w as timestampTemporalColumn, x as timestampInstantColumn, y as timeStringColumn } from "./column-types-BZdRRC1l.mjs";
|
|
7
7
|
export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8BigIntColumn, intervalPartsColumn, intervalStringColumn, jsonbColumn, numericStringColumn, plainJsonColumn, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer, qualifyName, quoteIdentifier, rawColumn, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampInstantColumn, timestampJsDateColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions } from "./contract-contributions-
|
|
2
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-
|
|
1
|
+
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions } from "./contract-contributions-BB4GLsqV-DRI0-5Oy.mjs";
|
|
2
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-CHlJgR4S-CLUPSnvo.mjs";
|
|
3
3
|
export { createPostgresAdapter, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as qualifyName, o as quoteIdentifier, r as escapeLiteral } from "./sql-utils-ClKAaUlZ-BdjnkJvV.mjs";
|
|
2
2
|
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-FvoD6sJj-ClHgHbyf.mjs";
|
|
3
|
-
import { t as PostgresControlAdapter } from "./contract-contributions-
|
|
4
|
-
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-
|
|
3
|
+
import { t as PostgresControlAdapter } from "./contract-contributions-BB4GLsqV-DRI0-5Oy.mjs";
|
|
4
|
+
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-CqWmMocA-D_Sj3QrO.mjs";
|
|
5
5
|
import { sqlDefaultFunctions } from "@prisma/orm-family-sql/family/control";
|
|
6
6
|
//#region ../../../3-targets/postgres/2-adapter/dist/control.mjs
|
|
7
7
|
const postgresDefaultFunctionRegistryEntries = Object.entries(sqlDefaultFunctions());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/control.mjs"],"sourcesContent":["import { n as PostgresControlAdapter } from \"./contract-contributions-
|
|
1
|
+
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/control.mjs"],"sourcesContent":["import { n as PostgresControlAdapter } from \"./contract-contributions-BB4GLsqV.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-CqWmMocA.mjs\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { sqlDefaultFunctions } from \"@internal/family-sql/control\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\n//#region src/core/migrations/control-mutation-defaults.ts\nconst postgresDefaultFunctionRegistryEntries = Object.entries(sqlDefaultFunctions());\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: { valueObjectStorageType: \"Jsonb\" },\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: []\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t], stack.dataTypes.lookup), stack.dataTypes.lookup, stack.declaredDataTypes.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;AAMA,MAAM,yCAAyC,OAAO,QAAQ,oBAAoB,CAAC;AACnF,SAAS,wCAAwC;CAChD,OAAO,IAAI,IAAI,sCAAsC;AACtD;AAGA,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW,EAAE,wBAAwB,QAAQ;CAC7C,yBAAyB;EACxB,yBAAyB,sCAAsC;EAC/D,sBAAsB,CAAC;CACxB;CACA,OAAO,OAAO;EACb,OAAO,IAAI,uBAAuB,8BAA8B;GAC/D,MAAM;GACN,GAAG,MAAM,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO;GACjD,GAAG,MAAM;EACV,GAAG,MAAM,UAAU,MAAM,GAAG,MAAM,UAAU,QAAQ,MAAM,kBAAkB,KAAK,EAAE,WAAW,IAAI,CAAC;CACpG;AACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as postgresCodecRegistry } from "./registry-CWgvB0Fj-Czwmfmzd.mjs";
|
|
2
2
|
import { t as assemblePostgresCodecRegistry } from "./codec-registry-FvoD6sJj-ClHgHbyf.mjs";
|
|
3
3
|
import { a as postgresNowGenerators } from "./date-time-now-generators-DylEKfQR-CYbXE0y0.mjs";
|
|
4
|
-
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-
|
|
5
|
-
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-
|
|
4
|
+
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-CHlJgR4S-CLUPSnvo.mjs";
|
|
5
|
+
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-CqWmMocA-D_Sj3QrO.mjs";
|
|
6
6
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
|
|
8
8
|
import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-
|
|
1
|
+
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-CHlJgR4S.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-CqWmMocA.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { postgresNowGenerators } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t...postgresNowGenerators.map(({ id, generate }) => ({\n\t\t\tid,\n\t\t\tgenerate,\n\t\t\tstability: \"query\"\n\t\t}))\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypes = assembleDataTypes(components);\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypes.lookup), dataTypes.lookup, dataTypes.declared.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;AASA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B,GAAG,sBAAsB,KAAK,EAAE,IAAI,gBAAgB;GACnD;GACA;GACA,WAAW;EACZ,EAAE;CACH;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,MAAM,aAAa;GAClB,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV;EACA,MAAM,YAAY,kBAAkB,UAAU;EAC9C,OAAO,uCAAuC,8BAA8B,YAAY,UAAU,MAAM,GAAG,UAAU,QAAQ,UAAU,SAAS,KAAK,EAAE,WAAW,IAAI,CAAC;CACxK;AACD"}
|
|
@@ -2,7 +2,7 @@ import { A as PG_TIMESTAMP_INSTANT_CODEC_ID, E as PG_TIMESTAMPTZ_DATE_CODEC_ID,
|
|
|
2
2
|
import { u as postgresError } from "./errors-DxWL0CMX-BQe7Wfvt.mjs";
|
|
3
3
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
|
|
4
4
|
import { f as weightGroupsOf, i as POSTGRES_TEXT_SEARCH_LANGUAGES, l as fullTextIndexProblems, n as FULL_TEXT_INDEX_TYPE, o as describeFullTextIndexProblem } from "./full-text-index-definition-MMcQF3_0-wRCz2FDP.mjs";
|
|
5
|
-
import { a as PostgresRlsEnablementSchema, c as PostgresRole, i as PostgresRlsEnablement, l as PostgresRoleSchema, n as PostgresExtensionSchema, o as PostgresRlsPolicy, r as PostgresNativeEnumSchema, s as PostgresRlsPolicySchema, t as PostgresExtension } from "./postgres-schema-
|
|
5
|
+
import { a as PostgresRlsEnablementSchema, c as PostgresRole, i as PostgresRlsEnablement, l as PostgresRoleSchema, n as PostgresExtensionSchema, o as PostgresRlsPolicy, r as PostgresNativeEnumSchema, s as PostgresRlsPolicySchema, t as PostgresExtension } from "./postgres-schema-BaGmKymi-WHJQsmeb.mjs";
|
|
6
6
|
import { r as computeContentHash } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
|
|
7
7
|
import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-YxSb5di3-9F5ofwnG.mjs";
|
|
8
8
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
@@ -17,7 +17,7 @@ import { blockAttribute, bool, dataTypeValue, entityRef, fieldRef, identifier, l
|
|
|
17
17
|
import { generatedIdColumnAliases } from "@prisma/orm-family-sql/contract/generated-id-column-aliases";
|
|
18
18
|
import { exactNameBodyWarning } from "@prisma/orm-family-sql/contract/index-naming";
|
|
19
19
|
import { SQL_EXPRESSION_DATA_TYPE_ID, requireSqlExpression, sqlTextFromStored } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
20
|
-
//#region ../../../3-targets/postgres/1-target/dist/authoring-
|
|
20
|
+
//#region ../../../3-targets/postgres/1-target/dist/authoring-ZsHi4vLr.mjs
|
|
21
21
|
/** The data type of every size argument on Postgres, such as a length or a precision: a typmod is an `int4`. */
|
|
22
22
|
const PG_SIZE_TYPE = "pg/int4";
|
|
23
23
|
const length = {
|
|
@@ -1556,4 +1556,4 @@ function postgresLowerEntityHandles(input) {
|
|
|
1556
1556
|
//#endregion
|
|
1557
1557
|
export { postgresAuthoringTypes as a, postgresScalarTypes as c, postgresAuthoringPslBlockDescriptors as i, postgresAuthoringEntityTypes as n, postgresExplicitTypes as o, postgresAuthoringModelAttributes as r, postgresLowerEntityHandles as s, POLICY_BLOCK_KEYWORDS as t };
|
|
1558
1558
|
|
|
1559
|
-
//# sourceMappingURL=authoring-
|
|
1559
|
+
//# sourceMappingURL=authoring-ZsHi4vLr-qbZ1hNzY.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-4dCWsSXg-DeIEoQWg.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/authoring-4dCWsSXg.mjs"],"sourcesContent":["import { A as PG_TIMESTAMP_INSTANT_CODEC_ID, E as PG_TIMESTAMPTZ_DATE_CODEC_ID, _ as PG_INTERVAL_STRING_CODEC_ID, k as PG_TIMESTAMP_DATE_CODEC_ID, s as PG_ENUM_CODEC_ID } from \"./codec-ids-2htdtS66.mjs\";\nimport { u as postgresError } from \"./errors-DxWL0CMX.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { f as weightGroupsOf, l as POSTGRES_TEXT_SEARCH_LANGUAGES, o as fullTextIndexProblems, r as describeFullTextIndexProblem, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-MMcQF3_0.mjs\";\nimport { t as postgresCodecTraitsOf } from \"./postgres-codec-traits-YxSb5di3.mjs\";\nimport { _ as PostgresRole, b as PostgresRlsEnablement, f as PostgresExtensionSchema, g as PostgresRoleSchema, h as PostgresRlsPolicySchema, m as PostgresRlsEnablementSchema, p as PostgresNativeEnumSchema, x as PostgresExtension, y as PostgresRlsPolicy } from \"./postgres-schema-CIfq1AjC.mjs\";\nimport { r as computeContentHash } from \"./canonicalize-RdxoUHao.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { sqlTargetTypeConstructors } from \"@internal/family-sql/pack\";\nimport { temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { UNBOUND_PSL_NAMESPACE_NAME } from \"@internal/framework-components/psl-ast\";\nimport { blockAttribute, bool, dataTypeValue, entityRef, fieldRef, identifier, leafDiagnostic, list, mapBlock, modelAttribute, oneOf, optional, str, structBlock } from \"@internal/psl-parser\";\nimport { generatedIdColumnAliases } from \"@internal/sql-contract/generated-id-column-aliases\";\nimport { exactNameBodyWarning } from \"@internal/sql-contract/index-naming\";\nimport { SQL_EXPRESSION_DATA_TYPE_ID, requireSqlExpression, sqlTextFromStored } from \"@internal/sql-contract/sql-expression\";\nimport { assertWireNamePrefixLength, normalizeSqlBody } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\n//#region src/core/type-constructors.ts\n/** The data type of every size argument on Postgres, such as a length or a precision: a typmod is an `int4`. */\nconst PG_SIZE_TYPE = \"pg/int4\";\nconst length = {\n\tkind: \"value\",\n\tdataType: PG_SIZE_TYPE,\n\tname: \"length\",\n\toptional: true\n};\nconst int2 = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A signed 16-bit integer stored as PostgreSQL int2 and represented as a JavaScript number.\",\n\toutput: { codecId: \"pg/int2@1\" }\n};\nconst int8Number = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A signed 64-bit integer stored as PostgreSQL int8 and represented as a JavaScript number within its safe integer range.\",\n\toutput: { codecId: \"pg/int8number@1\" }\n};\nconst numericString = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"An exact decimal value stored as PostgreSQL numeric, with optional precision and scale, and represented as decimal text.\",\n\targs: [{\n\t\tkind: \"value\",\n\t\tdataType: PG_SIZE_TYPE,\n\t\tname: \"precision\",\n\t\toptional: true\n\t}, {\n\t\tkind: \"value\",\n\t\tdataType: PG_SIZE_TYPE,\n\t\tname: \"scale\",\n\t\toptional: true\n\t}],\n\toutput: {\n\t\tcodecId: \"pg/numeric@1\",\n\t\ttypeParams: {\n\t\t\tprecision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 1\n\t\t\t}\n\t\t}\n\t}\n};\nconst numericBigInt = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"An arbitrary-precision integer stored as PostgreSQL numeric and represented as a JavaScript bigint.\",\n\toutput: { codecId: \"pg/unboundedint@1\" }\n};\nconst float4 = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A single-precision floating-point number stored as PostgreSQL float4.\",\n\toutput: { codecId: \"pg/float4@1\" }\n};\nconst varchar = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text stored as PostgreSQL character varying, with an optional maximum character length.\",\n\targs: [length],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n};\nconst varbit = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A variable-length bit string with an optional maximum length in bits.\",\n\targs: [length],\n\toutput: {\n\t\tcodecId: \"pg/varbit@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n};\n/**\n* PostgreSQL's explicit types: each names one codec, and is what the contract stores. Each is named after the database type, plus the application value where the database type is read by more than one codec of its data type (ADR 322, rule 4). The `json` type is `PlainJson`, because `Json` is its convenience type.\n*/\nconst postgresExplicitTypes = {\n\tInt2: {\n\t\t...int2,\n\t\tinferred: true\n\t},\n\tInt4: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 32-bit integer stored as PostgreSQL int4 and represented as a JavaScript number.\",\n\t\toutput: { codecId: \"pg/int4@1\" }\n\t},\n\tInt8BigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 64-bit integer stored as PostgreSQL int8 and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: \"pg/int8@1\" }\n\t},\n\tInt8Number: int8Number,\n\tNumericString: {\n\t\t...numericString,\n\t\tinferred: true\n\t},\n\tNumericBigInt: numericBigInt,\n\tFloat4: {\n\t\t...float4,\n\t\tinferred: true\n\t},\n\tFloat8: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A double-precision floating-point number stored as PostgreSQL float8.\",\n\t\toutput: { codecId: \"pg/float8@1\" }\n\t},\n\tText: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Variable-length text stored as PostgreSQL text.\",\n\t\toutput: { codecId: \"pg/text@1\" }\n\t},\n\tVarchar: {\n\t\t...varchar,\n\t\tinferred: true\n\t},\n\tChar: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Fixed-length, blank-padded text stored as PostgreSQL character, with an optional character length.\",\n\t\targs: [length],\n\t\toutput: {\n\t\t\tcodecId: \"sql/char@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tBool: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A true or false value stored as PostgreSQL bool.\",\n\t\toutput: { codecId: \"pg/bool@1\" }\n\t},\n\tBytea: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Binary data stored as PostgreSQL bytea and represented as a Uint8Array.\",\n\t\toutput: { codecId: \"pg/bytea@1\" }\n\t},\n\tPlainJson: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A JSON value stored as PostgreSQL json, the JSON text as written.\",\n\t\toutput: { codecId: \"pg/json@1\" }\n\t},\n\tJsonb: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A JSON value stored in PostgreSQL binary jsonb format.\",\n\t\toutput: { codecId: \"pg/jsonb@1\" }\n\t},\n\tTimestampTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time without a time zone, represented as Temporal.PlainDateTime.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamp-temporal@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestamptzTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant represented as Temporal.Instant, with optional fractional-second precision.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamptz-temporal@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimeTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A time of day without a time zone, represented as Temporal.PlainTime.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/time-temporal@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimetz: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A time of day with a UTC offset stored as PostgreSQL timetz and represented as ISO 8601 text.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timetz@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tUuid: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A universally unique identifier stored as PostgreSQL uuid.\",\n\t\toutput: { codecId: \"pg/uuid@1\" }\n\t},\n\tInet: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An IPv4 or IPv6 address with an optional subnet mask.\",\n\t\toutput: { codecId: \"pg/inet@1\" }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: \"pg/date-temporal@1\" }\n\t},\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A PostgreSQL date represented as ISO 8601 text rather than Temporal.PlainDate.\",\n\t\toutput: { codecId: \"pg/date-string@1\" }\n\t},\n\tTimestampString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A timestamp without a time zone represented as ISO 8601 text.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamp-string@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestamptzJsDate: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An instant stored as PostgreSQL timestamptz and represented as a JavaScript Date.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestampJsDate: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A date and time stored as PostgreSQL timestamp and represented as a JavaScript Date, read and written as UTC.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_TIMESTAMP_DATE_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestampInstant: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as PostgreSQL timestamp and represented as Temporal.Instant, read and written as UTC.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_TIMESTAMP_INSTANT_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestamptzString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A timestamp with time zone represented as ISO 8601 text, the instant in UTC.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamptz-string@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimeString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A time of day without a time zone represented as ISO 8601 text.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/time-string@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tBit: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A fixed-length bit string with an optional length in bits.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"length\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/bit@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tVarbit: {\n\t\t...varbit,\n\t\tinferred: true\n\t},\n\tXml: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An XML document or content fragment stored as PostgreSQL xml.\",\n\t\toutput: { codecId: \"pg/xml@1\" }\n\t},\n\tOid: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An object identifier: an unsigned 32-bit integer stored as PostgreSQL oid and represented as a JavaScript number.\",\n\t\toutput: { codecId: \"pg/oid@1\" }\n\t},\n\tMoney: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A currency amount in cents stored as PostgreSQL money and represented as decimal text with two fraction digits, such as \\\"-1234.56\\\".\",\n\t\toutput: { codecId: \"pg/money@1\" }\n\t},\n\tIntervalParts: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A span of time stored as PostgreSQL interval and represented as { months, days, micros }, with optional fractional-second precision.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/interval@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tIntervalString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A span of time stored as PostgreSQL interval and represented as an ISO 8601 duration such as P1Y2M, with optional fractional-second precision.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_INTERVAL_STRING_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t}\n};\n/**\n* The explicit types' former names, kept for one release line as deprecated aliases. Each gives the same codec as its replacement, and the PSL interpreter warns where one is written (ADR 257).\n*/\nconst postgresDeprecatedScalarTypes = {\n\tSmallInt: {\n\t\t...int2,\n\t\tdeprecated: { replacement: \"Int2\" }\n\t},\n\tBigIntNumber: {\n\t\t...int8Number,\n\t\tdeprecated: { replacement: \"Int8Number\" }\n\t},\n\tNumeric: {\n\t\t...numericString,\n\t\tdeprecated: { replacement: \"NumericString\" }\n\t},\n\tUnboundedInt: {\n\t\t...numericBigInt,\n\t\tdeprecated: { replacement: \"NumericBigInt\" }\n\t},\n\tReal: {\n\t\t...float4,\n\t\tdeprecated: { replacement: \"Float4\" }\n\t},\n\tVarChar: {\n\t\t...varchar,\n\t\tdeprecated: { replacement: \"Varchar\" }\n\t},\n\tVarBit: {\n\t\t...varbit,\n\t\tdeprecated: { replacement: \"Varbit\" }\n\t}\n};\nconst precision = {\n\tkind: \"value\",\n\tdataType: PG_SIZE_TYPE,\n\tname: \"precision\",\n\toptional: true\n};\n/**\n* The convenience date and time types. Each is a type choice: its `as` and `storage` arguments choose the explicit type it becomes, and `precision` is passed on to that type. ADR 279.\n*/\nconst postgresConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string. `storage` is timestamptz or timestamp, a timestamp read and written as UTC.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\n\t\t\t\t\t\"jsDate\",\n\t\t\t\t\t\"temporal\",\n\t\t\t\t\t\"string\"\n\t\t\t\t],\n\t\t\t\tdefault: \"jsDate\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"timestamptz\", \"timestamp\"],\n\t\t\t\tdefault: \"timestamptz\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamptz\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestamptzJsDate\",\n\t\t\t\tdefaults: { precision: 3 }\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"timestamptz\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestamptzTemporal\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timestamptz\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestamptzString\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampJsDate\",\n\t\t\t\tdefaults: { precision: 3 }\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampInstant\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampString\"\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date. `as` is what the application reads: string, such as \\\"2024-02-29\\\", or temporal (Temporal.PlainDate).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"date\"],\n\t\t\tdefault: \"date\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"date\"\n\t\t\t},\n\t\t\ttype: \"DateString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"date\"\n\t\t\t},\n\t\t\ttype: \"DateTemporal\"\n\t\t}]\n\t},\n\tTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A time of day. `as` is what the application reads: string, such as \\\"09:30:00\\\", or temporal (Temporal.PlainTime). `storage` is time, or timetz with as: string.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"time\", \"timetz\"],\n\t\t\t\tdefault: \"time\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"time\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimeString\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"time\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimeTemporal\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timetz\"\n\t\t\t\t},\n\t\t\t\ttype: \"Timetz\"\n\t\t\t}\n\t\t]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A length of time. `as` is what the application reads: string, an ISO 8601 duration such as \\\"P1M\\\", or parts, the object { months, days, micros }.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"parts\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"interval\"],\n\t\t\t\tdefault: \"interval\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"interval\"\n\t\t\t},\n\t\t\ttype: \"IntervalString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"parts\",\n\t\t\t\tstorage: \"interval\"\n\t\t\t},\n\t\t\ttype: \"IntervalParts\"\n\t\t}]\n\t}\n};\n/**\n* The convenience types of PostgreSQL's other scalars, `Json` among them. Each is a type choice: `storage` chooses the database type and, for `BigInt`, `as` chooses the application value; `precision`, `scale` and `length` are passed on to the explicit type chosen. ADR 279, ADR 316.\n*/\nconst postgresConvenienceScalarTypes = {\n\tInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer read as a JavaScript number. `storage` is int4, a 32-bit integer, or int2, a 16-bit integer.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"int4\", \"int2\"],\n\t\t\tdefault: \"int4\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"int4\" },\n\t\t\ttype: \"Int4\"\n\t\t}, {\n\t\t\twhen: { storage: \"int2\" },\n\t\t\ttype: \"Int2\"\n\t\t}]\n\t},\n\tBigInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer that may exceed 32 bits. `as` is what the application reads: bigint, or number within the safe integer range. `storage` is int8, a 64-bit integer, or numeric, an integer of any size, with as: bigint.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"bigint\", \"number\"],\n\t\t\tdefault: \"bigint\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"int8\", \"numeric\"],\n\t\t\tdefault: \"int8\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"bigint\",\n\t\t\t\t\tstorage: \"int8\"\n\t\t\t\t},\n\t\t\t\ttype: \"Int8BigInt\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"number\",\n\t\t\t\t\tstorage: \"int8\"\n\t\t\t\t},\n\t\t\t\ttype: \"Int8Number\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"bigint\",\n\t\t\t\t\tstorage: \"numeric\"\n\t\t\t\t},\n\t\t\t\ttype: \"NumericBigInt\"\n\t\t\t}\n\t\t]\n\t},\n\tFloat: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A floating-point number. `storage` is float8, double precision, or float4, single precision.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"float8\", \"float4\"],\n\t\t\tdefault: \"float8\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"float8\" },\n\t\t\ttype: \"Float8\"\n\t\t}, {\n\t\t\twhen: { storage: \"float4\" },\n\t\t\ttype: \"Float4\"\n\t\t}]\n\t},\n\tDecimal: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An exact decimal number, read as decimal text such as \\\"12.50\\\". `storage` is numeric, with optional precision and scale.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"numeric\"],\n\t\t\t\tdefault: \"numeric\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision,\n\t\t\t{\n\t\t\t\tkind: \"value\",\n\t\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\t\tname: \"scale\",\n\t\t\t\toptional: true\n\t\t\t}\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"numeric\" },\n\t\t\ttype: \"NumericString\"\n\t\t}]\n\t},\n\tString: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Text. `storage` is text, of any length, or varchar or char, which take an optional length.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\n\t\t\t\t\"text\",\n\t\t\t\t\"varchar\",\n\t\t\t\t\"char\"\n\t\t\t],\n\t\t\tdefault: \"text\",\n\t\t\toptional: true\n\t\t}, length],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: { storage: \"text\" },\n\t\t\t\ttype: \"Text\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: { storage: \"varchar\" },\n\t\t\t\ttype: \"Varchar\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: { storage: \"char\" },\n\t\t\t\ttype: \"Char\"\n\t\t\t}\n\t\t]\n\t},\n\tBoolean: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A true or false value. `storage` is bool.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"bool\"],\n\t\t\tdefault: \"bool\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"bool\" },\n\t\t\ttype: \"Bool\"\n\t\t}]\n\t},\n\tBytes: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Binary data, read as a Uint8Array. `storage` is bytea.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"bytea\"],\n\t\t\tdefault: \"bytea\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"bytea\" },\n\t\t\ttype: \"Bytea\"\n\t\t}]\n\t},\n\tJson: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A JSON value. `storage` is json, the JSON text as written, or jsonb, a binary form that supports equality filters, indexes and unique constraints.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"json\", \"jsonb\"],\n\t\t\tdefault: \"json\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"json\" },\n\t\t\ttype: \"PlainJson\"\n\t\t}, {\n\t\t\twhen: { storage: \"jsonb\" },\n\t\t\ttype: \"Jsonb\"\n\t\t}]\n\t}\n};\n/**\n* PostgreSQL's scalar types: the explicit types, the convenience types and the deprecated aliases. It is not the whole `type` namespace: the target contributes it together with `postgresAuthoringTypes`, which adds the namespaced `sql.*`, `temporal.*` and `pg.enum` and the generated-ID aliases such as `UuidString`.\n*/\nconst postgresScalarTypes = {\n\t...postgresExplicitTypes,\n\t...postgresConvenienceDateTimeTypes,\n\t...postgresConvenienceScalarTypes,\n\t...postgresDeprecatedScalarTypes\n};\n//#endregion\n//#region src/core/authoring.ts\nconst PSL_POLICY_INVALID_MAP = \"PSL_POLICY_INVALID_MAP\";\nconst PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS = \"PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS\";\nconst PSL_FULL_TEXT_INDEX_EMPTY_GROUP = \"PSL_FULL_TEXT_INDEX_EMPTY_GROUP\";\nconst PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD = \"PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD\";\nconst PSL_FULL_TEXT_INDEX_REQUIRES_NAME = \"PSL_FULL_TEXT_INDEX_REQUIRES_NAME\";\nconst PSL_FULL_TEXT_INDEX_NAME_XOR_MAP = \"PSL_FULL_TEXT_INDEX_NAME_XOR_MAP\";\nconst PSL_FULL_TEXT_INDEX_TEXT_FIELD = \"PSL_FULL_TEXT_INDEX_TEXT_FIELD\";\nconst PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE = \"PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE\";\nconst PSL_NATIVE_ENUM_MISSING_MEMBERS = \"PSL_NATIVE_ENUM_MISSING_MEMBERS\";\nconst PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE = \"PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE\";\n/**\n* `pg.enum(<ref>)` registers as an ordinary type constructor whose sole\n* positional argument names a `native_enum` entity instead of carrying a\n* literal value. The interpreter resolves the ref to the `native_enum`\n* entity generically (driven by `entityRefArg`); the `pg/enum@1` codec\n* descriptor's `columnFromEntity` hook (see `codecs.ts`) converts that\n* entity into the column's `typeParams`. The column's type name comes from the\n* `pg/enum` data type, which renders `typeParams.typeName`.\n*/\nconst postgresAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: PG_SIZE_TYPE }),\n\t...generatedIdColumnAliases,\n\tpg: { enum: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tentityRefArg: {\n\t\t\tindex: 0,\n\t\t\tentityKind: \"native_enum\"\n\t\t},\n\t\toutput: { codecId: PG_ENUM_CODEC_ID }\n\t} },\n\ttemporal: /* @__PURE__ */ postgresTemporalTypeAliases()\n};\n/**\n* The created-at and updated-at aliases, on the type bare `DateTime` becomes: a `timestamptz(3)` column read as a JavaScript `Date` (ADR 279).\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction postgresTemporalTypeAliases() {\n\treturn temporalTypeAliases({\n\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\ttypeParams: { precision: 3 }\n\t}, \"a JavaScript Date\");\n}\nconst policyTargetParam = {\n\ttype: entityRef({ kind: \"model\" }),\n\tdocumentation: \"The model protected by this policy; it must declare @@rls.\"\n};\nconst policyRolesParam = {\n\ttype: optional(list(oneOf(entityRef({\n\t\tkind: \"block\",\n\t\tkeyword: \"role\"\n\t}), identifier()))),\n\tdocumentation: \"The database roles to which this policy applies.\"\n};\nfunction policyUsingParam(ctx) {\n\treturn {\n\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\tdocumentation: \"A SQL predicate controlling which rows this policy permits.\"\n\t};\n}\nfunction policyWithCheckParam(ctx) {\n\treturn {\n\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\tdocumentation: \"A SQL predicate checking rows being written by this policy.\"\n\t};\n}\nconst policyPermissiveParam = {\n\ttype: optional(bool()),\n\tdocumentation: \"Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).\"\n};\nfunction policyUsingOnlySpec(ctx) {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam(ctx),\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyWithCheckOnlySpec(ctx) {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\twithCheck: policyWithCheckParam(ctx),\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyBothPredicatesSpec(ctx) {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam(ctx),\n\t\twithCheck: policyWithCheckParam(ctx),\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction roleSpec() {\n\treturn structBlock({ parameters: {} });\n}\nfunction extensionSpec() {\n\treturn structBlock({ parameters: {} });\n}\nfunction nativeEnumSpec() {\n\treturn mapBlock({ value: {\n\t\ttype: str(),\n\t\tdocumentation: \"The member value stored in the database enum type.\"\n\t} });\n}\n/**\n* The block keyword that authors each row-level security operation. The keyword is the operation, so\n* a policy block has no `operation` parameter. The reader looks a block's operation up here, and\n* `contract infer` and `contract print` look up the keyword to write.\n*/\nconst POLICY_BLOCK_KEYWORDS = {\n\tselect: \"policy_select\",\n\tinsert: \"policy_insert\",\n\tupdate: \"policy_update\",\n\tdelete: \"policy_delete\",\n\tall: \"policy_all\"\n};\nfunction isRlsPolicyOperation(value) {\n\treturn Object.hasOwn(POLICY_BLOCK_KEYWORDS, value);\n}\n/** The operation a `policy_<operation>` block keyword authors, or `undefined` for another keyword. */\nfunction policyOperationOfKeyword(keyword) {\n\treturn Object.keys(POLICY_BLOCK_KEYWORDS).filter(isRlsPolicyOperation).find((operation) => POLICY_BLOCK_KEYWORDS[operation] === keyword);\n}\n/**\n* Assembles a {@link PostgresRlsPolicy} from lowered inputs: normalizes the\n* predicates, computes the content-hash wire name, and constructs the frozen\n* entity. The single hash-assembly body shared by the PSL block lowering\n* ({@link lowerRlsPolicyFromBlock}) and the TS entity-handle lowering\n* ({@link postgresLowerEntityHandles}) so the two surfaces cannot drift.\n*/\nfunction buildRlsPolicyEntity(input) {\n\tconst permissive = input.permissive ?? true;\n\tconst wireHash = computeContentHash({\n\t\t...ifDefined(\"using\", input.using !== void 0 ? normalizeSqlBody(input.using) : void 0),\n\t\t...ifDefined(\"withCheck\", input.withCheck !== void 0 ? normalizeSqlBody(input.withCheck) : void 0),\n\t\troles: input.roles,\n\t\toperation: input.operation,\n\t\tpermissive\n\t});\n\treturn new PostgresRlsPolicy({\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix: input.prefix,\n\t\t\thash: wireHash\n\t\t},\n\t\ttableName: input.tableName,\n\t\tnamespaceId: input.namespaceId,\n\t\toperation: input.operation,\n\t\troles: input.roles,\n\t\tusing: input.using,\n\t\twithCheck: input.withCheck,\n\t\tpermissive\n\t});\n}\nfunction lowerRlsPolicyFromBlock(block, ctx) {\n\tconst prefix = block.name;\n\tconst operation = policyOperationOfKeyword(block.keyword) ?? \"select\";\n\tconst target = block.resolvedModelRefs?.[\"target\"];\n\tassertDefined(target, `lowerRlsPolicyFromBlock: policy \"${block.name}\" reached the factory without a projected \\`target\\` coordinate; the interpreter projects checked model references before invoking entity factories.`);\n\tconst roles = block.values.roles === void 0 ? [] : block.values.roles.map((role) => typeof role === \"string\" ? role : role.declaration.name).sort();\n\tconst using = block.values.using === void 0 ? void 0 : sqlTextFromStored(block.values.using.value.value);\n\tconst withCheck = block.values.withCheck === void 0 ? void 0 : sqlTextFromStored(block.values.withCheck.value.value);\n\tconst permissive = block.values.permissive ?? true;\n\tconst mapAttr = block.attributes[\"map\"];\n\tif (mapAttr !== void 0) {\n\t\tconst exactName = mapAttr.args[\"name\"];\n\t\tinvariant(typeof exactName === \"string\", \"@@map on a policy block parses one string argument\");\n\t\tctx.warnings?.push(exactNameBodyWarning(\"policy\", exactName));\n\t\treturn new PostgresRlsPolicy({\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: exactName\n\t\t\t},\n\t\t\ttableName: target.tableName,\n\t\t\tnamespaceId: target.namespaceId,\n\t\t\toperation,\n\t\t\troles,\n\t\t\tusing,\n\t\t\twithCheck,\n\t\t\tpermissive\n\t\t});\n\t}\n\treturn buildRlsPolicyEntity({\n\t\tprefix,\n\t\ttableName: target.tableName,\n\t\tnamespaceId: target.namespaceId,\n\t\toperation,\n\t\troles,\n\t\t...ifDefined(\"using\", using),\n\t\t...ifDefined(\"withCheck\", withCheck),\n\t\tpermissive\n\t});\n}\nconst policyEntityTypeOutput = {\n\tfactory: lowerRlsPolicyFromBlock,\n\tpslPlacement: (entity) => ({ namespaceId: entity.namespaceId })\n};\nfunction lowerNativeEnumFromBlock(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst mapAttr = block.attributes[\"map\"];\n\tlet typeName = block.name;\n\tif (mapAttr !== void 0) {\n\t\tconst mapped = mapAttr.args[\"name\"];\n\t\tinvariant(typeof mapped === \"string\", \"@@map on a native_enum block parses one string argument\");\n\t\ttypeName = mapped;\n\t}\n\tlet memberError = false;\n\tconst seenValues = /* @__PURE__ */ new Set();\n\tconst members = [];\n\tfor (const [memberName, value] of Object.entries(block.values)) {\n\t\tif (seenValues.has(value)) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\": duplicate member value \"${value}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.parameterSpans[memberName] ?? block.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tseenValues.add(value);\n\t\tmembers.push(value);\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: PSL_NATIVE_ENUM_MISSING_MEMBERS,\n\t\t\tmessage: `native_enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresNativeEnum({\n\t\ttypeName,\n\t\tmembers\n\t});\n}\n/**\n* `native_enum`'s entity-type factory output, checked separately from the assembled\n* `postgresAuthoringEntityTypes` map below: `deriveValueSet` is SQL-family surface\n* ({@link SqlValueSetDerivingEntityTypeOutput}), not part of the framework\n* `AuthoringEntityTypeFactoryOutput` shape, so folding it directly into the map's single\n* `satisfies AuthoringEntityTypeNamespace` check would trip an excess-property error. Checking it\n* here against the intersection of both shapes keeps it structurally valid against each without\n* widening the map's own check.\n*/\nconst nativeEnumEntityTypeOutput = {\n\tfactory: lowerNativeEnumFromBlock,\n\tderiveValueSet: (entity) => ({\n\t\tkind: \"valueSet\",\n\t\tvalues: [...entity.members]\n\t})\n};\n/**\n* Lowers a `role <name> {}` block into a {@link PostgresRole}. Roles are\n* cluster-scoped in Postgres, so the block must be declared inside\n* `namespace unbound { … }` — any other lexical namespace (a named schema,\n* or the default bucket top-level declarations resolve to) is a load-time\n* diagnostic. The lowered entity carries the unbound coordinate.\n*/\nfunction lowerRoleFromBlock(block, ctx) {\n\tif (block.namespaceId !== UNBOUND_NAMESPACE_ID) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE,\n\t\t\tmessage: `\\`role\\` block \"${block.name}\" must be declared inside \\`namespace unbound { }\\`, not in namespace \"${block.namespaceId}\"`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresRole({\n\t\tname: block.name,\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t});\n}\nconst postgresAuthoringEntityTypes = {\n\trole: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"role\",\n\t\tvalidatorSchema: PostgresRoleSchema,\n\t\toutput: { factory: lowerRoleFromBlock }\n\t},\n\trls: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"rls\",\n\t\tvalidatorSchema: PostgresRlsEnablementSchema,\n\t\toutput: { factory: (input) => new PostgresRlsEnablement(input) }\n\t},\n\tpolicy: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"policy\",\n\t\tvalidatorSchema: PostgresRlsPolicySchema,\n\t\toutput: policyEntityTypeOutput\n\t},\n\tnative_enum: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"native_enum\",\n\t\tvalidatorSchema: PostgresNativeEnumSchema,\n\t\toutput: nativeEnumEntityTypeOutput\n\t},\n\textension: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"extension\",\n\t\tvalidatorSchema: PostgresExtensionSchema,\n\t\toutput: {\n\t\t\tfactory: (block) => new PostgresExtension({ name: block.name }),\n\t\t\tnameUniqueAcrossNamespaces: true\n\t\t}\n\t}\n};\nconst policyRequiresRls = {\n\tparameter: \"target\",\n\tattribute: \"rls\"\n};\nconst policyMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this row-level security policy to its PostgreSQL policy name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The nonempty PostgreSQL policy name.\"\n\t}],\n\trefine: (parsed, ctx, attributeNode) => parsed.name === \"\" ? [leafDiagnostic(ctx, attributeNode, \"@@map policy name must be a non-empty string\", PSL_POLICY_INVALID_MAP)] : []\n});\nconst policyBlockAttributes = { map: () => policyMapAttribute };\nconst nativeEnumMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this native enum to its PostgreSQL type name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The PostgreSQL enum type name.\"\n\t}]\n});\nconst postgresAuthoringPslBlockDescriptors = {\n\t[POLICY_BLOCK_KEYWORDS.select]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.select,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be selected.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.delete]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.delete,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be deleted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.insert]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.insert,\n\t\tdocumentation: \"Defines a row-level security policy checking rows being inserted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyWithCheckOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.update]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.update,\n\t\tdocumentation: \"Defines a row-level security policy controlling row visibility and checks for updates.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.all]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.all,\n\t\tdocumentation: \"Defines a row-level security policy applying to all operations.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\tnative_enum: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"native_enum\",\n\t\tdocumentation: \"Defines a PostgreSQL enum type with named string-valued members.\",\n\t\tdiscriminator: \"native_enum\",\n\t\tname: { required: true },\n\t\tspec: nativeEnumSpec,\n\t\tnameIsStorageName: true,\n\t\tattributes: { map: () => nativeEnumMapAttribute }\n\t},\n\t/**\n\t* PSL block descriptor for `role` (e.g. `role anon {}`). Name-only, no\n\t* parameters and no body content. Declared inside `namespace unbound { }`\n\t* — see {@link lowerRoleFromBlock} for the placement check and the\n\t* coordinate the lowered entity carries.\n\t*/\n\trole: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"role\",\n\t\tdocumentation: \"Declares an existing database role in namespace unbound for use in security policies.\",\n\t\tdiscriminator: \"role\",\n\t\tname: { required: true },\n\t\tspec: roleSpec\n\t},\n\textension: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"extension\",\n\t\tdocumentation: \"Declares a PostgreSQL extension the database must have installed, in the schema of the enclosing namespace. In `namespace unbound`, the extension is found through the connection's search path.\",\n\t\tdiscriminator: \"extension\",\n\t\tname: { required: true },\n\t\tspec: extensionSpec\n\t}\n};\nconst postgresRlsSpec = modelAttribute(\"rls\", { documentation: \"Enables PostgreSQL row-level security on this model’s table.\" });\nconst postgresRlsSpecFactory = () => postgresRlsSpec;\nconst [firstLanguage, ...remainingLanguages] = POSTGRES_TEXT_SEARCH_LANGUAGES;\nconst fullTextField = fieldRef();\nfunction postgresFullTextIndexSpec(ctx) {\n\treturn modelAttribute(\"fullTextIndex\", {\n\t\tdocumentation: \"Indexes text fields for full-text search. Each item of the list is a weight group, strongest first; a nested list puts several fields in one group. Pass the index from the table's `indexes` to `fullTextMatches` and `fullTextRank` to search the same document.\",\n\t\tpositional: [{\n\t\t\tkey: \"fields\",\n\t\t\ttype: oneOf(fullTextField, list(oneOf(fullTextField, list(fullTextField)), { allowEmpty: false })),\n\t\t\tdocumentation: \"The fields to index: one field, or a list of fields and lists of fields. Each top-level item is a weight group, from A down to D.\"\n\t\t}],\n\t\tnamed: {\n\t\t\tlanguage: {\n\t\t\t\ttype: optional(oneOf(str(firstLanguage), ...remainingLanguages.map((language) => str(language)))),\n\t\t\t\tdocumentation: \"The text-search configuration. Defaults to `english`, and must match the language the query operations are given.\"\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The index name. Mutually exclusive with `map`.\"\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The database index name. Mutually exclusive with `name`.\"\n\t\t\t},\n\t\t\twhere: {\n\t\t\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\t\t\tdocumentation: \"The SQL predicate restricting rows included in a partial index.\"\n\t\t\t}\n\t\t},\n\t\trefine: (value, ctx, attributeNode) => {\n\t\t\tconst diagnostics = fullTextIndexProblems({ weightGroups: weightGroupsOf(value.fields, isFieldName) }).filter(isPslFullTextIndexProblem).map((problem) => leafDiagnostic(ctx, attributeNode, describeFullTextIndexProblem(\"`@@fullTextIndex`\", problem), FULL_TEXT_INDEX_PROBLEM_CODES[problem.kind]));\n\t\t\tif (value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` requires a `name` or `map` argument\", PSL_FULL_TEXT_INDEX_REQUIRES_NAME));\n\t\t\tif (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` takes at most one of `name` and `map`\", PSL_FULL_TEXT_INDEX_NAME_XOR_MAP));\n\t\t\treturn diagnostics;\n\t\t}\n\t});\n}\nfunction isFieldName(value) {\n\treturn typeof value === \"string\";\n}\nfunction isPslFullTextIndexProblem(problem) {\n\treturn problem.kind !== \"unique\" && problem.kind !== \"no-fields\";\n}\nconst FULL_TEXT_INDEX_PROBLEM_CODES = {\n\t\"too-many-groups\": PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS,\n\t\"empty-group\": PSL_FULL_TEXT_INDEX_EMPTY_GROUP,\n\t\"duplicate-field\": PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD,\n\t\"not-text\": PSL_FULL_TEXT_INDEX_TEXT_FIELD\n};\nconst postgresFullTextIndexSpecFactory = (ctx) => postgresFullTextIndexSpec(ctx);\n/**\n* `@@` model attributes contributed by the Postgres target pack.\n*\n* `@@rls` is argument-less: presence marks the model's table\n* RLS-controlled. It lowers to a {@link PostgresRlsEnablement} marker in\n* the namespace's `entries.rls`, keyed by the model's table name — the\n* marker (never the policy set) is what drives\n* `ENABLE`/`DISABLE ROW LEVEL SECURITY` planning.\n*/\nconst postgresAuthoringModelAttributes = {\n\trls: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"rls\",\n\t\tspec: postgresRlsSpecFactory,\n\t\tlower: (_parsed, ctx) => ({\n\t\t\tkey: ctx.storageName,\n\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\ttableName: ctx.storageName,\n\t\t\t\tnamespaceId: ctx.namespaceId\n\t\t\t})\n\t\t})\n\t},\n\tfullTextIndex: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"fullTextIndex\",\n\t\tspec: postgresFullTextIndexSpecFactory,\n\t\trepeatable: true,\n\t\tlower: (parsed, ctx) => {\n\t\t\tconst fieldGroups = weightGroupsOf(parsed.fields, isFieldName);\n\t\t\tconst problems = fullTextIndexProblems({\n\t\t\t\tweightGroups: fieldGroups,\n\t\t\t\tcodecs: {\n\t\t\t\t\tcodecIdOf: (fieldName) => ctx.fieldStorageName(fieldName) === void 0 ? void 0 : ctx.fieldCodecId(fieldName),\n\t\t\t\t\ttraitsOf: postgresCodecTraitsOf\n\t\t\t\t}\n\t\t\t}).filter(isPslFullTextIndexProblem);\n\t\t\tfor (const problem of problems) ctx.diagnostics?.push({\n\t\t\t\tcode: FULL_TEXT_INDEX_PROBLEM_CODES[problem.kind],\n\t\t\t\tmessage: describeFullTextIndexProblem(\"`@@fullTextIndex`\", problem, (fieldName) => `${ctx.modelName}.${fieldName}`),\n\t\t\t\tsourceId: ctx.sourceId ?? \"unknown\"\n\t\t\t});\n\t\t\tif (problems.length > 0) return void 0;\n\t\t\tconst weightGroups = fieldGroups.map((group) => group.map((fieldName) => {\n\t\t\t\tconst columnName = ctx.fieldStorageName(fieldName);\n\t\t\t\tassertDefined(columnName, `@@fullTextIndex field \"${fieldName}\" has no storage column`);\n\t\t\t\treturn columnName;\n\t\t\t}));\n\t\t\treturn { index: {\n\t\t\t\tcolumns: weightGroups.flat(),\n\t\t\t\ttype: FULL_TEXT_INDEX_TYPE,\n\t\t\t\toptions: {\n\t\t\t\t\tweightGroups,\n\t\t\t\t\tlanguage: parsed.language ?? \"english\"\n\t\t\t\t},\n\t\t\t\twhere: parsed.where === void 0 ? void 0 : sqlTextFromStored(parsed.where.value.value),\n\t\t\t\tunique: void 0,\n\t\t\t\tname: parsed.name,\n\t\t\t\tmap: parsed.map\n\t\t\t} };\n\t\t}\n\t}\n};\nfunction predicateText(predicate, what) {\n\treturn predicate === void 0 ? void 0 : requireSqlExpression(predicate, what).text;\n}\n/**\n* Resolves an entity handle's `target` ref to a table coordinate of this\n* contract, or throws the load-time diagnostic naming the handle: a\n* cross-space target is rejected (you cannot CREATE POLICY on a table\n* another space owns) and an unresolved target names the model.\n*/\nfunction requireLocalTarget(refs, subject) {\n\tconst target = refs[\"target\"];\n\tif (target !== void 0 && target.kind === \"resolved\") return {\n\t\tnamespaceId: target.namespaceId,\n\t\ttableName: target.tableName\n\t};\n\tif (target !== void 0 && target.kind === \"cross-space\") throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: ${subject} targets model \"${target.modelName ?? target.tableName}\", which lives in another contract space. Policies and rlsEnabled entries must target a model declared in this contract.`, { meta: {\n\t\tmodel: target.modelName ?? target.tableName,\n\t\treason: \"cross-space-target\"\n\t} });\n\tthrow postgresError(\"CONTRACT.MODEL_UNKNOWN\", `defineContract: ${subject} targets model \"${target?.modelName ?? \"<anonymous>\"}\", which is not in the contract's models. Add the model to \\`models\\`.`, { meta: { model: target?.modelName ?? \"<anonymous>\" } });\n}\n/**\n* The SQL-family entity-handle batch lowering hook for the Postgres pack\n* (`SqlEntityHandleLoweringContribution`). Receives every `entities` handle\n* whose kind this pack registered — batch, so the cross-entity diagnostics\n* (duplicate prefix, policy without rlsEnabled, duplicate role) can see\n* sibling handles — and lowers them with the same keying and hash assembly\n* as the PSL path: `policy` keyed by prefix (wire name via\n* {@link buildRlsPolicyEntity}), `rls` keyed by table name, `role` keyed by\n* name and filed under the default namespace (roles are declared\n* contract-wide; PSL has no role block to set a precedent).\n*/\nfunction postgresLowerEntityHandles(input) {\n\tconst enablements = /* @__PURE__ */ new Map();\n\tconst roles = /* @__PURE__ */ new Map();\n\tconst extensionNamespaces = /* @__PURE__ */ new Map();\n\tconst policies = [];\n\tconst coordinateKey = (coordinate) => `${coordinate.namespaceId} ${coordinate.tableName}`;\n\tfor (const { handle, refs } of input.handles) switch (handle.entityKind) {\n\t\tcase \"rls\": {\n\t\t\tconst coordinate = requireLocalTarget(refs, \"an rlsEnabled entry\");\n\t\t\tconst key = coordinateKey(coordinate);\n\t\t\tif (!enablements.has(key)) enablements.set(key, {\n\t\t\t\tcoordinate,\n\t\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\t\tnamespaceId: coordinate.namespaceId\n\t\t\t\t})\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"role\": {\n\t\t\tconst roleHandle = blindCast(handle);\n\t\t\tif (roles.has(roleHandle.name)) throw postgresError(\"CONTRACT.ROLE_INVALID\", `defineContract: role \"${roleHandle.name}\" is declared more than once in the entities list.`, { meta: {\n\t\t\t\trole: roleHandle.name,\n\t\t\t\treason: \"duplicate\"\n\t\t\t} });\n\t\t\troles.set(roleHandle.name, new PostgresRole({\n\t\t\t\tname: roleHandle.name,\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t\t\t}));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"policy\": {\n\t\t\tconst policyHandle = blindCast(handle);\n\t\t\tpolicies.push({\n\t\t\t\thandle: policyHandle,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"extension\": {\n\t\t\tconst extensionHandle = blindCast(handle);\n\t\t\tconst namespaceId = extensionHandle.namespace ?? input.defaultNamespaceId;\n\t\t\tconst declaredIn = extensionNamespaces.get(extensionHandle.name);\n\t\t\tif (declaredIn === namespaceId) throw postgresError(\"CONTRACT.NAME_DUPLICATE\", `defineContract: extension \"${extensionHandle.name}\" is declared more than once.`, { meta: {\n\t\t\t\tkind: \"extension\",\n\t\t\t\tname: extensionHandle.name,\n\t\t\t\tnamespaceId\n\t\t\t} });\n\t\t\tif (declaredIn !== void 0) {\n\t\t\t\tconst namespaces = [declaredIn, namespaceId].sort();\n\t\t\t\tconst namespaceNames = namespaces.map((id) => id === UNBOUND_NAMESPACE_ID ? UNBOUND_PSL_NAMESPACE_NAME : id);\n\t\t\t\tthrow postgresError(\"CONTRACT.NAME_DUPLICATE\", `defineContract: extension \"${extensionHandle.name}\" is declared in namespaces ${namespaceNames.sort().map((name) => `\"${name}\"`).join(\" and \")}; declare it in one namespace only.`, { meta: {\n\t\t\t\t\tkind: \"extension\",\n\t\t\t\t\tname: extensionHandle.name,\n\t\t\t\t\tnamespaces\n\t\t\t\t} });\n\t\t\t}\n\t\t\textensionNamespaces.set(extensionHandle.name, namespaceId);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: throw postgresError(\"CONTRACT.ENTITY_KIND_INVALID\", `defineContract: the postgres pack does not lower \"${handle.entityKind}\" handles from the entities list.`, { meta: { entityKind: handle.entityKind } });\n\t}\n\tconst rows = [];\n\tconst seenPrefixes = /* @__PURE__ */ new Set();\n\tfor (const { handle: policy, refs } of policies) {\n\t\tconst prefix = policy.name;\n\t\tassertWireNamePrefixLength(prefix, \"defineContract: policy prefix\");\n\t\tconst coordinate = requireLocalTarget(refs, `policy \"${prefix}\"`);\n\t\tif (!enablements.has(coordinateKey(coordinate))) {\n\t\t\tconst target = refs[\"target\"];\n\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy \"${prefix}\" targets model \"${target?.modelName ?? coordinate.tableName}\", whose table is not RLS-enabled. Add rlsEnabled(<model>) to the entities list.`, { meta: {\n\t\t\t\tprefix,\n\t\t\t\tmodel: target?.modelName ?? coordinate.tableName,\n\t\t\t\treason: \"target-not-rls-enabled\"\n\t\t\t} });\n\t\t}\n\t\tconst prefixKey = `${coordinate.namespaceId} ${prefix}`;\n\t\tif (seenPrefixes.has(prefixKey)) throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy prefix \"${prefix}\" is declared more than once in namespace \"${coordinate.namespaceId}\". Policy prefixes must be unique per namespace.`, { meta: {\n\t\t\tprefix,\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\treason: \"duplicate-prefix\"\n\t\t} });\n\t\tseenPrefixes.add(prefixKey);\n\t\tconst roleNames = [...new Set(policy.roles.map((roleHandle) => roleHandle.name))].sort();\n\t\trows.push({\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\tentityKind: \"policy\",\n\t\t\tkey: prefix,\n\t\t\tentity: buildRlsPolicyEntity({\n\t\t\t\tprefix,\n\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\t\toperation: policy.operation,\n\t\t\t\troles: roleNames,\n\t\t\t\t...ifDefined(\"using\", predicateText(policy.using, `Policy \"${prefix}\" using`)),\n\t\t\t\t...ifDefined(\"withCheck\", predicateText(policy.withCheck, `Policy \"${prefix}\" withCheck`))\n\t\t\t})\n\t\t});\n\t}\n\tfor (const { coordinate, entity } of enablements.values()) rows.push({\n\t\tnamespaceId: coordinate.namespaceId,\n\t\tentityKind: \"rls\",\n\t\tkey: coordinate.tableName,\n\t\tentity\n\t});\n\tfor (const [name, entity] of roles) rows.push({\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\tentityKind: \"role\",\n\t\tkey: name,\n\t\tentity\n\t});\n\tfor (const [name, namespaceId] of extensionNamespaces) rows.push({\n\t\tnamespaceId,\n\t\tentityKind: \"extension\",\n\t\tkey: name,\n\t\tentity: new PostgresExtension({ name })\n\t});\n\treturn rows;\n}\n//#endregion\nexport { postgresAuthoringTypes as a, postgresScalarTypes as c, postgresAuthoringPslBlockDescriptors as i, postgresAuthoringEntityTypes as n, postgresLowerEntityHandles as o, postgresAuthoringModelAttributes as r, postgresExplicitTypes as s, POLICY_BLOCK_KEYWORDS as t };\n\n//# sourceMappingURL=authoring-4dCWsSXg.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,eAAe;AACrB,MAAM,SAAS;CACd,MAAM;CACN,UAAU;CACV,MAAM;CACN,UAAU;AACX;AACA,MAAM,OAAO;CACZ,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,YAAY;AAChC;AACA,MAAM,aAAa;CAClB,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,kBAAkB;AACtC;AACA,MAAM,gBAAgB;CACrB,MAAM;CACN,eAAe;CACf,MAAM,CAAC;EACN,MAAM;EACN,UAAU;EACV,MAAM;EACN,UAAU;CACX,GAAG;EACF,MAAM;EACN,UAAU;EACV,MAAM;EACN,UAAU;CACX,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY;GACX,WAAW;IACV,MAAM;IACN,OAAO;GACR;GACA,OAAO;IACN,MAAM;I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GACT,aAAa,WAAW;GACxB,YAAY;GACZ,KAAK;GACL,QAAQ,qBAAqB;IAC5B;IACA,WAAW,WAAW;IACtB,aAAa,WAAW;IACxB,WAAW,OAAO;IAClB,OAAO;IACP,GAAG,UAAU,SAAS,cAAc,OAAO,OAAO,WAAW,OAAO,QAAQ,CAAC;IAC7E,GAAG,UAAU,aAAa,cAAc,OAAO,WAAW,WAAW,OAAO,YAAY,CAAC;GAC1F,CAAC;EACF,CAAC;CACF;CACA,KAAK,MAAM,EAAE,YAAY,YAAY,YAAY,OAAO,GAAG,KAAK,KAAK;EACpE,aAAa,WAAW;EACxB,YAAY;EACZ,KAAK,WAAW;EAChB;CACD,CAAC;CACD,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,KAAK,KAAK;EAC7C,aAAa;EACb,YAAY;EACZ,KAAK;EACL;CACD,CAAC;CACD,KAAK,MAAM,CAAC,MAAM,gBAAgB,qBAAqB,KAAK,KAAK;EAChE;EACA,YAAY;EACZ,KAAK;EACL,QAAQ,IAAI,kBAAkB,EAAE,KAAK,CAAC;CACvC,CAAC;CACD,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"authoring-ZsHi4vLr-qbZ1hNzY.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/authoring-ZsHi4vLr.mjs"],"sourcesContent":["import { A as PG_TIMESTAMP_INSTANT_CODEC_ID, E as PG_TIMESTAMPTZ_DATE_CODEC_ID, _ as PG_INTERVAL_STRING_CODEC_ID, k as PG_TIMESTAMP_DATE_CODEC_ID, s as PG_ENUM_CODEC_ID } from \"./codec-ids-2htdtS66.mjs\";\nimport { u as postgresError } from \"./errors-DxWL0CMX.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { f as weightGroupsOf, l as POSTGRES_TEXT_SEARCH_LANGUAGES, o as fullTextIndexProblems, r as describeFullTextIndexProblem, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-MMcQF3_0.mjs\";\nimport { t as postgresCodecTraitsOf } from \"./postgres-codec-traits-YxSb5di3.mjs\";\nimport { _ as PostgresRole, b as PostgresRlsEnablement, f as PostgresExtensionSchema, g as PostgresRoleSchema, h as PostgresRlsPolicySchema, m as PostgresRlsEnablementSchema, p as PostgresNativeEnumSchema, x as PostgresExtension, y as PostgresRlsPolicy } from \"./postgres-schema-BaGmKymi.mjs\";\nimport { r as computeContentHash } from \"./canonicalize-RdxoUHao.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { sqlTargetTypeConstructors } from \"@internal/family-sql/pack\";\nimport { temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { UNBOUND_PSL_NAMESPACE_NAME } from \"@internal/framework-components/psl-ast\";\nimport { blockAttribute, bool, dataTypeValue, entityRef, fieldRef, identifier, leafDiagnostic, list, mapBlock, modelAttribute, oneOf, optional, str, structBlock } from \"@internal/psl-parser\";\nimport { generatedIdColumnAliases } from \"@internal/sql-contract/generated-id-column-aliases\";\nimport { exactNameBodyWarning } from \"@internal/sql-contract/index-naming\";\nimport { SQL_EXPRESSION_DATA_TYPE_ID, requireSqlExpression, sqlTextFromStored } from \"@internal/sql-contract/sql-expression\";\nimport { assertWireNamePrefixLength, normalizeSqlBody } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\n//#region src/core/type-constructors.ts\n/** The data type of every size argument on Postgres, such as a length or a precision: a typmod is an `int4`. */\nconst PG_SIZE_TYPE = \"pg/int4\";\nconst length = {\n\tkind: \"value\",\n\tdataType: PG_SIZE_TYPE,\n\tname: \"length\",\n\toptional: true\n};\nconst int2 = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A signed 16-bit integer stored as PostgreSQL int2 and represented as a JavaScript number.\",\n\toutput: { codecId: \"pg/int2@1\" }\n};\nconst int8Number = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A signed 64-bit integer stored as PostgreSQL int8 and represented as a JavaScript number within its safe integer range.\",\n\toutput: { codecId: \"pg/int8number@1\" }\n};\nconst numericString = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"An exact decimal value stored as PostgreSQL numeric, with optional precision and scale, and represented as decimal text.\",\n\targs: [{\n\t\tkind: \"value\",\n\t\tdataType: PG_SIZE_TYPE,\n\t\tname: \"precision\",\n\t\toptional: true\n\t}, {\n\t\tkind: \"value\",\n\t\tdataType: PG_SIZE_TYPE,\n\t\tname: \"scale\",\n\t\toptional: true\n\t}],\n\toutput: {\n\t\tcodecId: \"pg/numeric@1\",\n\t\ttypeParams: {\n\t\t\tprecision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 1\n\t\t\t}\n\t\t}\n\t}\n};\nconst numericBigInt = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"An arbitrary-precision integer stored as PostgreSQL numeric and represented as a JavaScript bigint.\",\n\toutput: { codecId: \"pg/unboundedint@1\" }\n};\nconst float4 = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A single-precision floating-point number stored as PostgreSQL float4.\",\n\toutput: { codecId: \"pg/float4@1\" }\n};\nconst varchar = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text stored as PostgreSQL character varying, with an optional maximum character length.\",\n\targs: [length],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n};\nconst varbit = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A variable-length bit string with an optional maximum length in bits.\",\n\targs: [length],\n\toutput: {\n\t\tcodecId: \"pg/varbit@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n};\n/**\n* PostgreSQL's explicit types: each names one codec, and is what the contract stores. Each is named after the database type, plus the application value where the database type is read by more than one codec of its data type (ADR 322, rule 4). The `json` type is `PlainJson`, because `Json` is its convenience type.\n*/\nconst postgresExplicitTypes = {\n\tInt2: {\n\t\t...int2,\n\t\tinferred: true\n\t},\n\tInt4: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 32-bit integer stored as PostgreSQL int4 and represented as a JavaScript number.\",\n\t\toutput: { codecId: \"pg/int4@1\" }\n\t},\n\tInt8BigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 64-bit integer stored as PostgreSQL int8 and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: \"pg/int8@1\" }\n\t},\n\tInt8Number: int8Number,\n\tNumericString: {\n\t\t...numericString,\n\t\tinferred: true\n\t},\n\tNumericBigInt: numericBigInt,\n\tFloat4: {\n\t\t...float4,\n\t\tinferred: true\n\t},\n\tFloat8: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A double-precision floating-point number stored as PostgreSQL float8.\",\n\t\toutput: { codecId: \"pg/float8@1\" }\n\t},\n\tText: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Variable-length text stored as PostgreSQL text.\",\n\t\toutput: { codecId: \"pg/text@1\" }\n\t},\n\tVarchar: {\n\t\t...varchar,\n\t\tinferred: true\n\t},\n\tChar: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Fixed-length, blank-padded text stored as PostgreSQL character, with an optional character length.\",\n\t\targs: [length],\n\t\toutput: {\n\t\t\tcodecId: \"sql/char@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tBool: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A true or false value stored as PostgreSQL bool.\",\n\t\toutput: { codecId: \"pg/bool@1\" }\n\t},\n\tBytea: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Binary data stored as PostgreSQL bytea and represented as a Uint8Array.\",\n\t\toutput: { codecId: \"pg/bytea@1\" }\n\t},\n\tPlainJson: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A JSON value stored as PostgreSQL json, the JSON text as written.\",\n\t\toutput: { codecId: \"pg/json@1\" }\n\t},\n\tJsonb: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A JSON value stored in PostgreSQL binary jsonb format.\",\n\t\toutput: { codecId: \"pg/jsonb@1\" }\n\t},\n\tTimestampTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time without a time zone, represented as Temporal.PlainDateTime.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamp-temporal@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestamptzTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant represented as Temporal.Instant, with optional fractional-second precision.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamptz-temporal@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimeTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A time of day without a time zone, represented as Temporal.PlainTime.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/time-temporal@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimetz: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A time of day with a UTC offset stored as PostgreSQL timetz and represented as ISO 8601 text.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timetz@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tUuid: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A universally unique identifier stored as PostgreSQL uuid.\",\n\t\toutput: { codecId: \"pg/uuid@1\" }\n\t},\n\tInet: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An IPv4 or IPv6 address with an optional subnet mask.\",\n\t\toutput: { codecId: \"pg/inet@1\" }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: \"pg/date-temporal@1\" }\n\t},\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A PostgreSQL date represented as ISO 8601 text rather than Temporal.PlainDate.\",\n\t\toutput: { codecId: \"pg/date-string@1\" }\n\t},\n\tTimestampString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A timestamp without a time zone represented as ISO 8601 text.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamp-string@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestamptzJsDate: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An instant stored as PostgreSQL timestamptz and represented as a JavaScript Date.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestampJsDate: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A date and time stored as PostgreSQL timestamp and represented as a JavaScript Date, read and written as UTC.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_TIMESTAMP_DATE_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestampInstant: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as PostgreSQL timestamp and represented as Temporal.Instant, read and written as UTC.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_TIMESTAMP_INSTANT_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimestamptzString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A timestamp with time zone represented as ISO 8601 text, the instant in UTC.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamptz-string@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tTimeString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A time of day without a time zone represented as ISO 8601 text.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/time-string@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tBit: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A fixed-length bit string with an optional length in bits.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"length\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/bit@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tVarbit: {\n\t\t...varbit,\n\t\tinferred: true\n\t},\n\tXml: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An XML document or content fragment stored as PostgreSQL xml.\",\n\t\toutput: { codecId: \"pg/xml@1\" }\n\t},\n\tOid: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An object identifier: an unsigned 32-bit integer stored as PostgreSQL oid and represented as a JavaScript number.\",\n\t\toutput: { codecId: \"pg/oid@1\" }\n\t},\n\tMoney: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A currency amount in cents stored as PostgreSQL money and represented as decimal text with two fraction digits, such as \\\"-1234.56\\\".\",\n\t\toutput: { codecId: \"pg/money@1\" }\n\t},\n\tIntervalParts: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A span of time stored as PostgreSQL interval and represented as { months, days, micros }, with optional fractional-second precision.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/interval@1\",\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tIntervalString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A span of time stored as PostgreSQL interval and represented as an ISO 8601 duration such as P1Y2M, with optional fractional-second precision.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\tname: \"precision\",\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: PG_INTERVAL_STRING_CODEC_ID,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t}\n};\n/**\n* The explicit types' former names, kept for one release line as deprecated aliases. Each gives the same codec as its replacement, and the PSL interpreter warns where one is written (ADR 257).\n*/\nconst postgresDeprecatedScalarTypes = {\n\tSmallInt: {\n\t\t...int2,\n\t\tdeprecated: { replacement: \"Int2\" }\n\t},\n\tBigIntNumber: {\n\t\t...int8Number,\n\t\tdeprecated: { replacement: \"Int8Number\" }\n\t},\n\tNumeric: {\n\t\t...numericString,\n\t\tdeprecated: { replacement: \"NumericString\" }\n\t},\n\tUnboundedInt: {\n\t\t...numericBigInt,\n\t\tdeprecated: { replacement: \"NumericBigInt\" }\n\t},\n\tReal: {\n\t\t...float4,\n\t\tdeprecated: { replacement: \"Float4\" }\n\t},\n\tVarChar: {\n\t\t...varchar,\n\t\tdeprecated: { replacement: \"Varchar\" }\n\t},\n\tVarBit: {\n\t\t...varbit,\n\t\tdeprecated: { replacement: \"Varbit\" }\n\t}\n};\nconst precision = {\n\tkind: \"value\",\n\tdataType: PG_SIZE_TYPE,\n\tname: \"precision\",\n\toptional: true\n};\n/**\n* The convenience date and time types. Each is a type choice: its `as` and `storage` arguments choose the explicit type it becomes, and `precision` is passed on to that type. ADR 279.\n*/\nconst postgresConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string. `storage` is timestamptz or timestamp, a timestamp read and written as UTC.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\n\t\t\t\t\t\"jsDate\",\n\t\t\t\t\t\"temporal\",\n\t\t\t\t\t\"string\"\n\t\t\t\t],\n\t\t\t\tdefault: \"jsDate\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"timestamptz\", \"timestamp\"],\n\t\t\t\tdefault: \"timestamptz\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamptz\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestamptzJsDate\",\n\t\t\t\tdefaults: { precision: 3 }\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"timestamptz\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestamptzTemporal\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timestamptz\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestamptzString\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampJsDate\",\n\t\t\t\tdefaults: { precision: 3 }\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampInstant\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampString\"\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date. `as` is what the application reads: string, such as \\\"2024-02-29\\\", or temporal (Temporal.PlainDate).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"date\"],\n\t\t\tdefault: \"date\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"date\"\n\t\t\t},\n\t\t\ttype: \"DateString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"date\"\n\t\t\t},\n\t\t\ttype: \"DateTemporal\"\n\t\t}]\n\t},\n\tTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A time of day. `as` is what the application reads: string, such as \\\"09:30:00\\\", or temporal (Temporal.PlainTime). `storage` is time, or timetz with as: string.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"time\", \"timetz\"],\n\t\t\t\tdefault: \"time\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"time\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimeString\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"time\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimeTemporal\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timetz\"\n\t\t\t\t},\n\t\t\t\ttype: \"Timetz\"\n\t\t\t}\n\t\t]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A length of time. `as` is what the application reads: string, an ISO 8601 duration such as \\\"P1M\\\", or parts, the object { months, days, micros }.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"parts\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"interval\"],\n\t\t\t\tdefault: \"interval\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"interval\"\n\t\t\t},\n\t\t\ttype: \"IntervalString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"parts\",\n\t\t\t\tstorage: \"interval\"\n\t\t\t},\n\t\t\ttype: \"IntervalParts\"\n\t\t}]\n\t}\n};\n/**\n* The convenience types of PostgreSQL's other scalars, `Json` among them. Each is a type choice: `storage` chooses the database type and, for `BigInt`, `as` chooses the application value; `precision`, `scale` and `length` are passed on to the explicit type chosen. ADR 279, ADR 316.\n*/\nconst postgresConvenienceScalarTypes = {\n\tInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer read as a JavaScript number. `storage` is int4, a 32-bit integer, or int2, a 16-bit integer.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"int4\", \"int2\"],\n\t\t\tdefault: \"int4\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"int4\" },\n\t\t\ttype: \"Int4\"\n\t\t}, {\n\t\t\twhen: { storage: \"int2\" },\n\t\t\ttype: \"Int2\"\n\t\t}]\n\t},\n\tBigInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer that may exceed 32 bits. `as` is what the application reads: bigint, or number within the safe integer range. `storage` is int8, a 64-bit integer, or numeric, an integer of any size, with as: bigint.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"bigint\", \"number\"],\n\t\t\tdefault: \"bigint\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"int8\", \"numeric\"],\n\t\t\tdefault: \"int8\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"bigint\",\n\t\t\t\t\tstorage: \"int8\"\n\t\t\t\t},\n\t\t\t\ttype: \"Int8BigInt\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"number\",\n\t\t\t\t\tstorage: \"int8\"\n\t\t\t\t},\n\t\t\t\ttype: \"Int8Number\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"bigint\",\n\t\t\t\t\tstorage: \"numeric\"\n\t\t\t\t},\n\t\t\t\ttype: \"NumericBigInt\"\n\t\t\t}\n\t\t]\n\t},\n\tFloat: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A floating-point number. `storage` is float8, double precision, or float4, single precision.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"float8\", \"float4\"],\n\t\t\tdefault: \"float8\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"float8\" },\n\t\t\ttype: \"Float8\"\n\t\t}, {\n\t\t\twhen: { storage: \"float4\" },\n\t\t\ttype: \"Float4\"\n\t\t}]\n\t},\n\tDecimal: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An exact decimal number, read as decimal text such as \\\"12.50\\\". `storage` is numeric, with optional precision and scale.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"numeric\"],\n\t\t\t\tdefault: \"numeric\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision,\n\t\t\t{\n\t\t\t\tkind: \"value\",\n\t\t\t\tdataType: PG_SIZE_TYPE,\n\t\t\t\tname: \"scale\",\n\t\t\t\toptional: true\n\t\t\t}\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"numeric\" },\n\t\t\ttype: \"NumericString\"\n\t\t}]\n\t},\n\tString: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Text. `storage` is text, of any length, or varchar or char, which take an optional length.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\n\t\t\t\t\"text\",\n\t\t\t\t\"varchar\",\n\t\t\t\t\"char\"\n\t\t\t],\n\t\t\tdefault: \"text\",\n\t\t\toptional: true\n\t\t}, length],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: { storage: \"text\" },\n\t\t\t\ttype: \"Text\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: { storage: \"varchar\" },\n\t\t\t\ttype: \"Varchar\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: { storage: \"char\" },\n\t\t\t\ttype: \"Char\"\n\t\t\t}\n\t\t]\n\t},\n\tBoolean: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A true or false value. `storage` is bool.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"bool\"],\n\t\t\tdefault: \"bool\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"bool\" },\n\t\t\ttype: \"Bool\"\n\t\t}]\n\t},\n\tBytes: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Binary data, read as a Uint8Array. `storage` is bytea.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"bytea\"],\n\t\t\tdefault: \"bytea\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"bytea\" },\n\t\t\ttype: \"Bytea\"\n\t\t}]\n\t},\n\tJson: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A JSON value. `storage` is json, the JSON text as written, or jsonb, a binary form that supports equality filters, indexes and unique constraints.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"json\", \"jsonb\"],\n\t\t\tdefault: \"json\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"json\" },\n\t\t\ttype: \"PlainJson\"\n\t\t}, {\n\t\t\twhen: { storage: \"jsonb\" },\n\t\t\ttype: \"Jsonb\"\n\t\t}]\n\t}\n};\n/**\n* PostgreSQL's scalar types: the explicit types, the convenience types and the deprecated aliases. It is not the whole `type` namespace: the target contributes it together with `postgresAuthoringTypes`, which adds the namespaced `sql.*`, `temporal.*` and `pg.enum` and the generated-ID aliases such as `UuidString`.\n*/\nconst postgresScalarTypes = {\n\t...postgresExplicitTypes,\n\t...postgresConvenienceDateTimeTypes,\n\t...postgresConvenienceScalarTypes,\n\t...postgresDeprecatedScalarTypes\n};\n//#endregion\n//#region src/core/authoring.ts\nconst PSL_POLICY_INVALID_MAP = \"PSL_POLICY_INVALID_MAP\";\nconst PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS = \"PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS\";\nconst PSL_FULL_TEXT_INDEX_EMPTY_GROUP = \"PSL_FULL_TEXT_INDEX_EMPTY_GROUP\";\nconst PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD = \"PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD\";\nconst PSL_FULL_TEXT_INDEX_REQUIRES_NAME = \"PSL_FULL_TEXT_INDEX_REQUIRES_NAME\";\nconst PSL_FULL_TEXT_INDEX_NAME_XOR_MAP = \"PSL_FULL_TEXT_INDEX_NAME_XOR_MAP\";\nconst PSL_FULL_TEXT_INDEX_TEXT_FIELD = \"PSL_FULL_TEXT_INDEX_TEXT_FIELD\";\nconst PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE = \"PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE\";\nconst PSL_NATIVE_ENUM_MISSING_MEMBERS = \"PSL_NATIVE_ENUM_MISSING_MEMBERS\";\nconst PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE = \"PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE\";\n/**\n* `pg.enum(<ref>)` registers as an ordinary type constructor whose sole\n* positional argument names a `native_enum` entity instead of carrying a\n* literal value. The interpreter resolves the ref to the `native_enum`\n* entity generically (driven by `entityRefArg`); the `pg/enum@1` codec\n* descriptor's `columnFromEntity` hook (see `codecs.ts`) converts that\n* entity into the column's `typeParams`. The column's type name comes from the\n* `pg/enum` data type, which renders `typeParams.typeName`.\n*/\nconst postgresAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: PG_SIZE_TYPE }),\n\t...generatedIdColumnAliases,\n\tpg: { enum: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tentityRefArg: {\n\t\t\tindex: 0,\n\t\t\tentityKind: \"native_enum\"\n\t\t},\n\t\toutput: { codecId: PG_ENUM_CODEC_ID }\n\t} },\n\ttemporal: /* @__PURE__ */ postgresTemporalTypeAliases()\n};\n/**\n* The created-at and updated-at aliases, on the type bare `DateTime` becomes: a `timestamptz(3)` column read as a JavaScript `Date` (ADR 279).\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction postgresTemporalTypeAliases() {\n\treturn temporalTypeAliases({\n\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\ttypeParams: { precision: 3 }\n\t}, \"a JavaScript Date\");\n}\nconst policyTargetParam = {\n\ttype: entityRef({ kind: \"model\" }),\n\tdocumentation: \"The model protected by this policy; it must declare @@rls.\"\n};\nconst policyRolesParam = {\n\ttype: optional(list(oneOf(entityRef({\n\t\tkind: \"block\",\n\t\tkeyword: \"role\"\n\t}), identifier()))),\n\tdocumentation: \"The database roles to which this policy applies.\"\n};\nfunction policyUsingParam(ctx) {\n\treturn {\n\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\tdocumentation: \"A SQL predicate controlling which rows this policy permits.\"\n\t};\n}\nfunction policyWithCheckParam(ctx) {\n\treturn {\n\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\tdocumentation: \"A SQL predicate checking rows being written by this policy.\"\n\t};\n}\nconst policyPermissiveParam = {\n\ttype: optional(bool()),\n\tdocumentation: \"Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).\"\n};\nfunction policyUsingOnlySpec(ctx) {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam(ctx),\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyWithCheckOnlySpec(ctx) {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\twithCheck: policyWithCheckParam(ctx),\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyBothPredicatesSpec(ctx) {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam(ctx),\n\t\twithCheck: policyWithCheckParam(ctx),\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction roleSpec() {\n\treturn structBlock({ parameters: {} });\n}\nfunction extensionSpec() {\n\treturn structBlock({ parameters: {} });\n}\nfunction nativeEnumSpec() {\n\treturn mapBlock({ value: {\n\t\ttype: str(),\n\t\tdocumentation: \"The member value stored in the database enum type.\"\n\t} });\n}\n/**\n* The block keyword that authors each row-level security operation. The keyword is the operation, so\n* a policy block has no `operation` parameter. The reader looks a block's operation up here, and\n* `contract infer` and `contract print` look up the keyword to write.\n*/\nconst POLICY_BLOCK_KEYWORDS = {\n\tselect: \"policy_select\",\n\tinsert: \"policy_insert\",\n\tupdate: \"policy_update\",\n\tdelete: \"policy_delete\",\n\tall: \"policy_all\"\n};\nfunction isRlsPolicyOperation(value) {\n\treturn Object.hasOwn(POLICY_BLOCK_KEYWORDS, value);\n}\n/** The operation a `policy_<operation>` block keyword authors, or `undefined` for another keyword. */\nfunction policyOperationOfKeyword(keyword) {\n\treturn Object.keys(POLICY_BLOCK_KEYWORDS).filter(isRlsPolicyOperation).find((operation) => POLICY_BLOCK_KEYWORDS[operation] === keyword);\n}\n/**\n* Assembles a {@link PostgresRlsPolicy} from lowered inputs: normalizes the\n* predicates, computes the content-hash wire name, and constructs the frozen\n* entity. The single hash-assembly body shared by the PSL block lowering\n* ({@link lowerRlsPolicyFromBlock}) and the TS entity-handle lowering\n* ({@link postgresLowerEntityHandles}) so the two surfaces cannot drift.\n*/\nfunction buildRlsPolicyEntity(input) {\n\tconst permissive = input.permissive ?? true;\n\tconst wireHash = computeContentHash({\n\t\t...ifDefined(\"using\", input.using !== void 0 ? normalizeSqlBody(input.using) : void 0),\n\t\t...ifDefined(\"withCheck\", input.withCheck !== void 0 ? normalizeSqlBody(input.withCheck) : void 0),\n\t\troles: input.roles,\n\t\toperation: input.operation,\n\t\tpermissive\n\t});\n\treturn new PostgresRlsPolicy({\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix: input.prefix,\n\t\t\thash: wireHash\n\t\t},\n\t\ttableName: input.tableName,\n\t\tnamespaceId: input.namespaceId,\n\t\toperation: input.operation,\n\t\troles: input.roles,\n\t\tusing: input.using,\n\t\twithCheck: input.withCheck,\n\t\tpermissive\n\t});\n}\nfunction lowerRlsPolicyFromBlock(block, ctx) {\n\tconst prefix = block.name;\n\tconst operation = policyOperationOfKeyword(block.keyword) ?? \"select\";\n\tconst target = block.resolvedModelRefs?.[\"target\"];\n\tassertDefined(target, `lowerRlsPolicyFromBlock: policy \"${block.name}\" reached the factory without a projected \\`target\\` coordinate; the interpreter projects checked model references before invoking entity factories.`);\n\tconst roles = block.values.roles === void 0 ? [] : block.values.roles.map((role) => typeof role === \"string\" ? role : role.declaration.name).sort();\n\tconst using = block.values.using === void 0 ? void 0 : sqlTextFromStored(block.values.using.value.value);\n\tconst withCheck = block.values.withCheck === void 0 ? void 0 : sqlTextFromStored(block.values.withCheck.value.value);\n\tconst permissive = block.values.permissive ?? true;\n\tconst mapAttr = block.attributes[\"map\"];\n\tif (mapAttr !== void 0) {\n\t\tconst exactName = mapAttr.args[\"name\"];\n\t\tinvariant(typeof exactName === \"string\", \"@@map on a policy block parses one string argument\");\n\t\tctx.warnings?.push(exactNameBodyWarning(\"policy\", exactName));\n\t\treturn new PostgresRlsPolicy({\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: exactName\n\t\t\t},\n\t\t\ttableName: target.tableName,\n\t\t\tnamespaceId: target.namespaceId,\n\t\t\toperation,\n\t\t\troles,\n\t\t\tusing,\n\t\t\twithCheck,\n\t\t\tpermissive\n\t\t});\n\t}\n\treturn buildRlsPolicyEntity({\n\t\tprefix,\n\t\ttableName: target.tableName,\n\t\tnamespaceId: target.namespaceId,\n\t\toperation,\n\t\troles,\n\t\t...ifDefined(\"using\", using),\n\t\t...ifDefined(\"withCheck\", withCheck),\n\t\tpermissive\n\t});\n}\nconst policyEntityTypeOutput = {\n\tfactory: lowerRlsPolicyFromBlock,\n\tpslPlacement: (entity) => ({ namespaceId: entity.namespaceId })\n};\nfunction lowerNativeEnumFromBlock(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst mapAttr = block.attributes[\"map\"];\n\tlet typeName = block.name;\n\tif (mapAttr !== void 0) {\n\t\tconst mapped = mapAttr.args[\"name\"];\n\t\tinvariant(typeof mapped === \"string\", \"@@map on a native_enum block parses one string argument\");\n\t\ttypeName = mapped;\n\t}\n\tlet memberError = false;\n\tconst seenValues = /* @__PURE__ */ new Set();\n\tconst members = [];\n\tfor (const [memberName, value] of Object.entries(block.values)) {\n\t\tif (seenValues.has(value)) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\": duplicate member value \"${value}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.parameterSpans[memberName] ?? block.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tseenValues.add(value);\n\t\tmembers.push(value);\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: PSL_NATIVE_ENUM_MISSING_MEMBERS,\n\t\t\tmessage: `native_enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresNativeEnum({\n\t\ttypeName,\n\t\tmembers\n\t});\n}\n/**\n* `native_enum`'s entity-type factory output, checked separately from the assembled\n* `postgresAuthoringEntityTypes` map below: `deriveValueSet` is SQL-family surface\n* ({@link SqlValueSetDerivingEntityTypeOutput}), not part of the framework\n* `AuthoringEntityTypeFactoryOutput` shape, so folding it directly into the map's single\n* `satisfies AuthoringEntityTypeNamespace` check would trip an excess-property error. Checking it\n* here against the intersection of both shapes keeps it structurally valid against each without\n* widening the map's own check.\n*/\nconst nativeEnumEntityTypeOutput = {\n\tfactory: lowerNativeEnumFromBlock,\n\tderiveValueSet: (entity) => ({\n\t\tkind: \"valueSet\",\n\t\tvalues: [...entity.members]\n\t})\n};\n/**\n* Lowers a `role <name> {}` block into a {@link PostgresRole}. Roles are\n* cluster-scoped in Postgres, so the block must be declared inside\n* `namespace unbound { … }` — any other lexical namespace (a named schema,\n* or the default bucket top-level declarations resolve to) is a load-time\n* diagnostic. The lowered entity carries the unbound coordinate.\n*/\nfunction lowerRoleFromBlock(block, ctx) {\n\tif (block.namespaceId !== UNBOUND_NAMESPACE_ID) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE,\n\t\t\tmessage: `\\`role\\` block \"${block.name}\" must be declared inside \\`namespace unbound { }\\`, not in namespace \"${block.namespaceId}\"`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresRole({\n\t\tname: block.name,\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t});\n}\nconst postgresAuthoringEntityTypes = {\n\trole: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"role\",\n\t\tvalidatorSchema: PostgresRoleSchema,\n\t\toutput: { factory: lowerRoleFromBlock }\n\t},\n\trls: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"rls\",\n\t\tvalidatorSchema: PostgresRlsEnablementSchema,\n\t\toutput: { factory: (input) => new PostgresRlsEnablement(input) }\n\t},\n\tpolicy: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"policy\",\n\t\tvalidatorSchema: PostgresRlsPolicySchema,\n\t\toutput: policyEntityTypeOutput\n\t},\n\tnative_enum: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"native_enum\",\n\t\tvalidatorSchema: PostgresNativeEnumSchema,\n\t\toutput: nativeEnumEntityTypeOutput\n\t},\n\textension: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"extension\",\n\t\tvalidatorSchema: PostgresExtensionSchema,\n\t\toutput: {\n\t\t\tfactory: (block) => new PostgresExtension({ name: block.name }),\n\t\t\tnameUniqueAcrossNamespaces: true\n\t\t}\n\t}\n};\nconst policyRequiresRls = {\n\tparameter: \"target\",\n\tattribute: \"rls\"\n};\nconst policyMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this row-level security policy to its PostgreSQL policy name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The nonempty PostgreSQL policy name.\"\n\t}],\n\trefine: (parsed, ctx, attributeNode) => parsed.name === \"\" ? [leafDiagnostic(ctx, attributeNode, \"@@map policy name must be a non-empty string\", PSL_POLICY_INVALID_MAP)] : []\n});\nconst policyBlockAttributes = { map: () => policyMapAttribute };\nconst nativeEnumMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this native enum to its PostgreSQL type name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The PostgreSQL enum type name.\"\n\t}]\n});\nconst postgresAuthoringPslBlockDescriptors = {\n\t[POLICY_BLOCK_KEYWORDS.select]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.select,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be selected.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.delete]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.delete,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be deleted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.insert]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.insert,\n\t\tdocumentation: \"Defines a row-level security policy checking rows being inserted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyWithCheckOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.update]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.update,\n\t\tdocumentation: \"Defines a row-level security policy controlling row visibility and checks for updates.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.all]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.all,\n\t\tdocumentation: \"Defines a row-level security policy applying to all operations.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\tnative_enum: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"native_enum\",\n\t\tdocumentation: \"Defines a PostgreSQL enum type with named string-valued members.\",\n\t\tdiscriminator: \"native_enum\",\n\t\tname: { required: true },\n\t\tspec: nativeEnumSpec,\n\t\tnameIsStorageName: true,\n\t\tattributes: { map: () => nativeEnumMapAttribute }\n\t},\n\t/**\n\t* PSL block descriptor for `role` (e.g. `role anon {}`). Name-only, no\n\t* parameters and no body content. Declared inside `namespace unbound { }`\n\t* — see {@link lowerRoleFromBlock} for the placement check and the\n\t* coordinate the lowered entity carries.\n\t*/\n\trole: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"role\",\n\t\tdocumentation: \"Declares an existing database role in namespace unbound for use in security policies.\",\n\t\tdiscriminator: \"role\",\n\t\tname: { required: true },\n\t\tspec: roleSpec\n\t},\n\textension: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"extension\",\n\t\tdocumentation: \"Declares a PostgreSQL extension the database must have installed, in the schema of the enclosing namespace. In `namespace unbound`, the extension is found through the connection's search path.\",\n\t\tdiscriminator: \"extension\",\n\t\tname: { required: true },\n\t\tspec: extensionSpec\n\t}\n};\nconst postgresRlsSpec = modelAttribute(\"rls\", { documentation: \"Enables PostgreSQL row-level security on this model’s table.\" });\nconst postgresRlsSpecFactory = () => postgresRlsSpec;\nconst [firstLanguage, ...remainingLanguages] = POSTGRES_TEXT_SEARCH_LANGUAGES;\nconst fullTextField = fieldRef();\nfunction postgresFullTextIndexSpec(ctx) {\n\treturn modelAttribute(\"fullTextIndex\", {\n\t\tdocumentation: \"Indexes text fields for full-text search. Each item of the list is a weight group, strongest first; a nested list puts several fields in one group. Pass the index from the table's `indexes` to `fullTextMatches` and `fullTextRank` to search the same document.\",\n\t\tpositional: [{\n\t\t\tkey: \"fields\",\n\t\t\ttype: oneOf(fullTextField, list(oneOf(fullTextField, list(fullTextField)), { allowEmpty: false })),\n\t\t\tdocumentation: \"The fields to index: one field, or a list of fields and lists of fields. Each top-level item is a weight group, from A down to D.\"\n\t\t}],\n\t\tnamed: {\n\t\t\tlanguage: {\n\t\t\t\ttype: optional(oneOf(str(firstLanguage), ...remainingLanguages.map((language) => str(language)))),\n\t\t\t\tdocumentation: \"The text-search configuration. Defaults to `english`, and must match the language the query operations are given.\"\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The index name. Mutually exclusive with `map`.\"\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\ttype: optional(str()),\n\t\t\t\tdocumentation: \"The database index name. Mutually exclusive with `name`.\"\n\t\t\t},\n\t\t\twhere: {\n\t\t\t\ttype: optional(dataTypeValue(SQL_EXPRESSION_DATA_TYPE_ID, ctx.dataTypes)),\n\t\t\t\tdocumentation: \"The SQL predicate restricting rows included in a partial index.\"\n\t\t\t}\n\t\t},\n\t\trefine: (value, ctx, attributeNode) => {\n\t\t\tconst diagnostics = fullTextIndexProblems({ weightGroups: weightGroupsOf(value.fields, isFieldName) }).filter(isPslFullTextIndexProblem).map((problem) => leafDiagnostic(ctx, attributeNode, describeFullTextIndexProblem(\"`@@fullTextIndex`\", problem), FULL_TEXT_INDEX_PROBLEM_CODES[problem.kind]));\n\t\t\tif (value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` requires a `name` or `map` argument\", PSL_FULL_TEXT_INDEX_REQUIRES_NAME));\n\t\t\tif (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` takes at most one of `name` and `map`\", PSL_FULL_TEXT_INDEX_NAME_XOR_MAP));\n\t\t\treturn diagnostics;\n\t\t}\n\t});\n}\nfunction isFieldName(value) {\n\treturn typeof value === \"string\";\n}\nfunction isPslFullTextIndexProblem(problem) {\n\treturn problem.kind !== \"unique\" && problem.kind !== \"no-fields\";\n}\nconst FULL_TEXT_INDEX_PROBLEM_CODES = {\n\t\"too-many-groups\": PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS,\n\t\"empty-group\": PSL_FULL_TEXT_INDEX_EMPTY_GROUP,\n\t\"duplicate-field\": PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD,\n\t\"not-text\": PSL_FULL_TEXT_INDEX_TEXT_FIELD\n};\nconst postgresFullTextIndexSpecFactory = (ctx) => postgresFullTextIndexSpec(ctx);\n/**\n* `@@` model attributes contributed by the Postgres target pack.\n*\n* `@@rls` is argument-less: presence marks the model's table\n* RLS-controlled. It lowers to a {@link PostgresRlsEnablement} marker in\n* the namespace's `entries.rls`, keyed by the model's table name — the\n* marker (never the policy set) is what drives\n* `ENABLE`/`DISABLE ROW LEVEL SECURITY` planning.\n*/\nconst postgresAuthoringModelAttributes = {\n\trls: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"rls\",\n\t\tspec: postgresRlsSpecFactory,\n\t\tlower: (_parsed, ctx) => ({\n\t\t\tkey: ctx.storageName,\n\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\ttableName: ctx.storageName,\n\t\t\t\tnamespaceId: ctx.namespaceId\n\t\t\t})\n\t\t})\n\t},\n\tfullTextIndex: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"fullTextIndex\",\n\t\tspec: postgresFullTextIndexSpecFactory,\n\t\trepeatable: true,\n\t\tlower: (parsed, ctx) => {\n\t\t\tconst fieldGroups = weightGroupsOf(parsed.fields, isFieldName);\n\t\t\tconst problems = fullTextIndexProblems({\n\t\t\t\tweightGroups: fieldGroups,\n\t\t\t\tcodecs: {\n\t\t\t\t\tcodecIdOf: (fieldName) => ctx.fieldStorageName(fieldName) === void 0 ? void 0 : ctx.fieldCodecId(fieldName),\n\t\t\t\t\ttraitsOf: postgresCodecTraitsOf\n\t\t\t\t}\n\t\t\t}).filter(isPslFullTextIndexProblem);\n\t\t\tfor (const problem of problems) ctx.diagnostics?.push({\n\t\t\t\tcode: FULL_TEXT_INDEX_PROBLEM_CODES[problem.kind],\n\t\t\t\tmessage: describeFullTextIndexProblem(\"`@@fullTextIndex`\", problem, (fieldName) => `${ctx.modelName}.${fieldName}`),\n\t\t\t\tsourceId: ctx.sourceId ?? \"unknown\"\n\t\t\t});\n\t\t\tif (problems.length > 0) return void 0;\n\t\t\tconst weightGroups = fieldGroups.map((group) => group.map((fieldName) => {\n\t\t\t\tconst columnName = ctx.fieldStorageName(fieldName);\n\t\t\t\tassertDefined(columnName, `@@fullTextIndex field \"${fieldName}\" has no storage column`);\n\t\t\t\treturn columnName;\n\t\t\t}));\n\t\t\treturn { index: {\n\t\t\t\tcolumns: weightGroups.flat(),\n\t\t\t\ttype: FULL_TEXT_INDEX_TYPE,\n\t\t\t\toptions: {\n\t\t\t\t\tweightGroups,\n\t\t\t\t\tlanguage: parsed.language ?? \"english\"\n\t\t\t\t},\n\t\t\t\twhere: parsed.where === void 0 ? void 0 : sqlTextFromStored(parsed.where.value.value),\n\t\t\t\tunique: void 0,\n\t\t\t\tname: parsed.name,\n\t\t\t\tmap: parsed.map\n\t\t\t} };\n\t\t}\n\t}\n};\nfunction predicateText(predicate, what) {\n\treturn predicate === void 0 ? void 0 : requireSqlExpression(predicate, what).text;\n}\n/**\n* Resolves an entity handle's `target` ref to a table coordinate of this\n* contract, or throws the load-time diagnostic naming the handle: a\n* cross-space target is rejected (you cannot CREATE POLICY on a table\n* another space owns) and an unresolved target names the model.\n*/\nfunction requireLocalTarget(refs, subject) {\n\tconst target = refs[\"target\"];\n\tif (target !== void 0 && target.kind === \"resolved\") return {\n\t\tnamespaceId: target.namespaceId,\n\t\ttableName: target.tableName\n\t};\n\tif (target !== void 0 && target.kind === \"cross-space\") throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: ${subject} targets model \"${target.modelName ?? target.tableName}\", which lives in another contract space. Policies and rlsEnabled entries must target a model declared in this contract.`, { meta: {\n\t\tmodel: target.modelName ?? target.tableName,\n\t\treason: \"cross-space-target\"\n\t} });\n\tthrow postgresError(\"CONTRACT.MODEL_UNKNOWN\", `defineContract: ${subject} targets model \"${target?.modelName ?? \"<anonymous>\"}\", which is not in the contract's models. Add the model to \\`models\\`.`, { meta: { model: target?.modelName ?? \"<anonymous>\" } });\n}\n/**\n* The SQL-family entity-handle batch lowering hook for the Postgres pack\n* (`SqlEntityHandleLoweringContribution`). Receives every `entities` handle\n* whose kind this pack registered — batch, so the cross-entity diagnostics\n* (duplicate prefix, policy without rlsEnabled, duplicate role) can see\n* sibling handles — and lowers them with the same keying and hash assembly\n* as the PSL path: `policy` keyed by prefix (wire name via\n* {@link buildRlsPolicyEntity}), `rls` keyed by table name, `role` keyed by\n* name and filed under the default namespace (roles are declared\n* contract-wide; PSL has no role block to set a precedent).\n*/\nfunction postgresLowerEntityHandles(input) {\n\tconst enablements = /* @__PURE__ */ new Map();\n\tconst roles = /* @__PURE__ */ new Map();\n\tconst extensionNamespaces = /* @__PURE__ */ new Map();\n\tconst policies = [];\n\tconst coordinateKey = (coordinate) => `${coordinate.namespaceId} ${coordinate.tableName}`;\n\tfor (const { handle, refs } of input.handles) switch (handle.entityKind) {\n\t\tcase \"rls\": {\n\t\t\tconst coordinate = requireLocalTarget(refs, \"an rlsEnabled entry\");\n\t\t\tconst key = coordinateKey(coordinate);\n\t\t\tif (!enablements.has(key)) enablements.set(key, {\n\t\t\t\tcoordinate,\n\t\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\t\tnamespaceId: coordinate.namespaceId\n\t\t\t\t})\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"role\": {\n\t\t\tconst roleHandle = blindCast(handle);\n\t\t\tif (roles.has(roleHandle.name)) throw postgresError(\"CONTRACT.ROLE_INVALID\", `defineContract: role \"${roleHandle.name}\" is declared more than once in the entities list.`, { meta: {\n\t\t\t\trole: roleHandle.name,\n\t\t\t\treason: \"duplicate\"\n\t\t\t} });\n\t\t\troles.set(roleHandle.name, new PostgresRole({\n\t\t\t\tname: roleHandle.name,\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t\t\t}));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"policy\": {\n\t\t\tconst policyHandle = blindCast(handle);\n\t\t\tpolicies.push({\n\t\t\t\thandle: policyHandle,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"extension\": {\n\t\t\tconst extensionHandle = blindCast(handle);\n\t\t\tconst namespaceId = extensionHandle.namespace ?? input.defaultNamespaceId;\n\t\t\tconst declaredIn = extensionNamespaces.get(extensionHandle.name);\n\t\t\tif (declaredIn === namespaceId) throw postgresError(\"CONTRACT.NAME_DUPLICATE\", `defineContract: extension \"${extensionHandle.name}\" is declared more than once.`, { meta: {\n\t\t\t\tkind: \"extension\",\n\t\t\t\tname: extensionHandle.name,\n\t\t\t\tnamespaceId\n\t\t\t} });\n\t\t\tif (declaredIn !== void 0) {\n\t\t\t\tconst namespaces = [declaredIn, namespaceId].sort();\n\t\t\t\tconst namespaceNames = namespaces.map((id) => id === UNBOUND_NAMESPACE_ID ? UNBOUND_PSL_NAMESPACE_NAME : id);\n\t\t\t\tthrow postgresError(\"CONTRACT.NAME_DUPLICATE\", `defineContract: extension \"${extensionHandle.name}\" is declared in namespaces ${namespaceNames.sort().map((name) => `\"${name}\"`).join(\" and \")}; declare it in one namespace only.`, { meta: {\n\t\t\t\t\tkind: \"extension\",\n\t\t\t\t\tname: extensionHandle.name,\n\t\t\t\t\tnamespaces\n\t\t\t\t} });\n\t\t\t}\n\t\t\textensionNamespaces.set(extensionHandle.name, namespaceId);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: throw postgresError(\"CONTRACT.ENTITY_KIND_INVALID\", `defineContract: the postgres pack does not lower \"${handle.entityKind}\" handles from the entities list.`, { meta: { entityKind: handle.entityKind } });\n\t}\n\tconst rows = [];\n\tconst seenPrefixes = /* @__PURE__ */ new Set();\n\tfor (const { handle: policy, refs } of policies) {\n\t\tconst prefix = policy.name;\n\t\tassertWireNamePrefixLength(prefix, \"defineContract: policy prefix\");\n\t\tconst coordinate = requireLocalTarget(refs, `policy \"${prefix}\"`);\n\t\tif (!enablements.has(coordinateKey(coordinate))) {\n\t\t\tconst target = refs[\"target\"];\n\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy \"${prefix}\" targets model \"${target?.modelName ?? coordinate.tableName}\", whose table is not RLS-enabled. Add rlsEnabled(<model>) to the entities list.`, { meta: {\n\t\t\t\tprefix,\n\t\t\t\tmodel: target?.modelName ?? coordinate.tableName,\n\t\t\t\treason: \"target-not-rls-enabled\"\n\t\t\t} });\n\t\t}\n\t\tconst prefixKey = `${coordinate.namespaceId} ${prefix}`;\n\t\tif (seenPrefixes.has(prefixKey)) throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy prefix \"${prefix}\" is declared more than once in namespace \"${coordinate.namespaceId}\". Policy prefixes must be unique per namespace.`, { meta: {\n\t\t\tprefix,\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\treason: \"duplicate-prefix\"\n\t\t} });\n\t\tseenPrefixes.add(prefixKey);\n\t\tconst roleNames = [...new Set(policy.roles.map((roleHandle) => roleHandle.name))].sort();\n\t\trows.push({\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\tentityKind: \"policy\",\n\t\t\tkey: prefix,\n\t\t\tentity: buildRlsPolicyEntity({\n\t\t\t\tprefix,\n\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\t\toperation: policy.operation,\n\t\t\t\troles: roleNames,\n\t\t\t\t...ifDefined(\"using\", predicateText(policy.using, `Policy \"${prefix}\" using`)),\n\t\t\t\t...ifDefined(\"withCheck\", predicateText(policy.withCheck, `Policy \"${prefix}\" withCheck`))\n\t\t\t})\n\t\t});\n\t}\n\tfor (const { coordinate, entity } of enablements.values()) rows.push({\n\t\tnamespaceId: coordinate.namespaceId,\n\t\tentityKind: \"rls\",\n\t\tkey: coordinate.tableName,\n\t\tentity\n\t});\n\tfor (const [name, entity] of roles) rows.push({\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\tentityKind: \"role\",\n\t\tkey: name,\n\t\tentity\n\t});\n\tfor (const [name, namespaceId] of extensionNamespaces) rows.push({\n\t\tnamespaceId,\n\t\tentityKind: \"extension\",\n\t\tkey: name,\n\t\tentity: new PostgresExtension({ name })\n\t});\n\treturn rows;\n}\n//#endregion\nexport { postgresAuthoringTypes as a, postgresScalarTypes as c, postgresAuthoringPslBlockDescriptors as i, postgresAuthoringEntityTypes as n, postgresLowerEntityHandles as o, postgresAuthoringModelAttributes as r, postgresExplicitTypes as s, POLICY_BLOCK_KEYWORDS as t };\n\n//# sourceMappingURL=authoring-ZsHi4vLr.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,eAAe;AACrB,MAAM,SAAS;CACd,MAAM;CACN,UAAU;CACV,MAAM;CACN,UAAU;AACX;AACA,MAAM,OAAO;CACZ,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,YAAY;AAChC;AACA,MAAM,aAAa;CAClB,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,kBAAkB;AACtC;AACA,MAAM,gBAAgB;CACrB,MAAM;CACN,eAAe;CACf,MAAM,CAAC;EACN,MAAM;EACN,UAAU;EACV,MAAM;EACN,UAAU;CACX,GAAG;EACF,MAAM;EACN,UAAU;EACV,MAAM;EACN,UAAU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