@prisma/orm-target-postgres 8.0.0-rc.17-dev.6 → 8.0.0-rc.17-dev.8
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__control.mjs +2 -2
- package/dist/adapter__runtime.mjs +1 -1
- package/dist/{authoring-CL05jlfX-CKUKjRVV.mjs → authoring-BsVnEibY-DEWnQRiF.mjs} +62 -55
- package/dist/authoring-BsVnEibY-DEWnQRiF.mjs.map +1 -0
- package/dist/{authoring-CLNoGwgA-DPDmJeBt.d.mts → authoring-DWd5pnnV-g81c_ETF.d.mts} +10 -10
- package/dist/authoring-DWd5pnnV-g81c_ETF.d.mts.map +1 -0
- package/dist/{control-CDAHFmyX.mjs → control-KIoUTWJ_.mjs} +48 -9
- package/dist/control-KIoUTWJ_.mjs.map +1 -0
- package/dist/{descriptor-meta-ClvaJRgh-Dlo6A0nL.mjs → descriptor-meta-DkzkByC8-WIm-Vvrd.mjs} +3 -3
- package/dist/{descriptor-meta-ClvaJRgh-Dlo6A0nL.mjs.map → descriptor-meta-DkzkByC8-WIm-Vvrd.mjs.map} +1 -1
- package/dist/{infer-psl-contract-lnoCopbJ-DRVPVZyI.mjs → infer-psl-contract-D0iF_YRT-DwW3Imk5.mjs} +62 -16
- package/dist/infer-psl-contract-D0iF_YRT-DwW3Imk5.mjs.map +1 -0
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{pack-C3Y2SBNH.d.mts → pack-BOVET-UW.d.mts} +3 -3
- package/dist/{pack-C3Y2SBNH.d.mts.map → pack-BOVET-UW.d.mts.map} +1 -1
- package/dist/{planner-BLGCBKzQ-BFmyE8A2.mjs → planner-an3B45Ri-2-1c8dYN.mjs} +4 -4
- package/dist/{planner-BLGCBKzQ-BFmyE8A2.mjs.map → planner-an3B45Ri-2-1c8dYN.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-8cUeUjsL-DwO8p6_t.mjs → planner-produced-postgres-migration-LNElx7_r-B4yTRRyt.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-8cUeUjsL-DwO8p6_t.mjs.map → planner-produced-postgres-migration-LNElx7_r-B4yTRRyt.mjs.map} +1 -1
- package/dist/{postgres-contract-view-BpZ_4qOD-BuCMIaSB.mjs → postgres-contract-view-BpmiHSDZ-C6ntn6T7.mjs} +3 -3
- package/dist/{postgres-contract-view-BpZ_4qOD-BuCMIaSB.mjs.map → postgres-contract-view-BpmiHSDZ-C6ntn6T7.mjs.map} +1 -1
- package/dist/{postgres-migration-Deb4XrMA-DO7iGvl2.mjs → postgres-migration-BtlvhcXs-UjWm8cAb.mjs} +3 -3
- package/dist/{postgres-migration-Deb4XrMA-DO7iGvl2.mjs.map → postgres-migration-BtlvhcXs-UjWm8cAb.mjs.map} +1 -1
- package/dist/{prisma7-binding-C1fIMMTb.d.mts → prisma7-binding-BQ5VOUjh.d.mts} +3 -3
- package/dist/{prisma7-binding-C1fIMMTb.d.mts.map → prisma7-binding-BQ5VOUjh.d.mts.map} +1 -1
- package/dist/{prisma7-binding-DE7hezAQ.mjs → prisma7-binding-Dq-vT_9_.mjs} +4 -4
- package/dist/{prisma7-binding-DE7hezAQ.mjs.map → prisma7-binding-Dq-vT_9_.mjs.map} +1 -1
- package/dist/target.d.mts +2 -2
- package/dist/target.mjs +7 -7
- package/dist/target__control.mjs +3 -3
- package/dist/target__migration.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.mjs +2 -2
- package/dist/target__runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/authoring-CL05jlfX-CKUKjRVV.mjs.map +0 -1
- package/dist/authoring-CLNoGwgA-DPDmJeBt.d.mts.map +0 -1
- package/dist/control-CDAHFmyX.mjs.map +0 -1
- package/dist/infer-psl-contract-lnoCopbJ-DRVPVZyI.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-KIoUTWJ_.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/control.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, s as PG_ENUM_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { M as setFallbackTemporal } from \"./codecs-BK3J4C0n.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { n as parsePostgresListText, t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { i as fullTextIndexDefinitionOf } from \"./full-text-index-definition-D-QC3DO2.mjs\";\nimport { c as postgresNowGeneratorIdFor, d as plainDateTimeNowControlDescriptor, f as INSTANT_NOW_GENERATOR_ID, l as PLAIN_DATE_TIME_NOW_GENERATOR_ID, m as instantNowControlDescriptor, t as POLICY_BLOCK_KEYWORDS } from \"./authoring-BsVnEibY.mjs\";\nimport { _ as PostgresRlsPolicy, h as PostgresRole, v as PostgresRlsEnablement } from \"./postgres-schema-DIaAgaL6.mjs\";\nimport { n as computeContentHash } from \"./canonicalize-CrN3u_xM.mjs\";\nimport { t as postgresRenderCheckExpressions } from \"./check-expressions-BaFrBceq.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-DkzkByC8.mjs\";\nimport { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from \"./postgres-table-schema-node-BBkitBQh.mjs\";\nimport { i as PostgresDatabaseSchemaNode } from \"./postgres-role-schema-node-B8Z5i5D-.mjs\";\nimport { n as diffPostgresSchema } from \"./diff-database-schema-CByLrBg6.mjs\";\nimport { d as postgresRenderDefault, u as postgresContractToSchema } from \"./postgres-migration-BtlvhcXs.mjs\";\nimport { t as createPostgresMigrationPlanner } from \"./planner-an3B45Ri.mjs\";\nimport { n as PostgresContractSerializer } from \"./postgres-contract-view-BpmiHSDZ.mjs\";\nimport { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from \"./marker-lock-DFc1Tfv5.mjs\";\nimport { a as buildFullTextIndexAttribute, c as buildNativeEnumBlock, d as buildAttribute, f as buildMapAttribute, g as createPostgresTypeMap, h as positionalArg, i as buildCheckAttribute, m as parseDefaultAttributeString, n as inferPostgresPslContract, o as buildIndexAttribute, p as namedArg, s as buildModelConstraintAttribute, u as SYNTHETIC_SPAN } from \"./infer-psl-contract-D0iF_YRT.mjs\";\nimport { dataTypeParams, isSqlDataType, unquotedSqlBaseName } from \"@internal/sql-contract/data-type\";\nimport { escapePslString } from \"@internal/sql-contract/data-type-support\";\nimport { requiredParamKeys, validateCodecTypeParams } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { StorageColumn, resolvedTypeParams } from \"@internal/sql-contract/types\";\nimport { Temporal } from \"temporal-polyfill/full/implementation\";\nimport { runnerFailure, runnerSuccess } from \"@internal/family-sql/control\";\nimport { findAuthoringTypeConstructorCall } from \"@internal/framework-components/authoring\";\nimport { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from \"@internal/psl-parser\";\nimport { printSqlExpressionLiteral, sqlTextsReadBack } from \"@internal/sql-contract/sql-expression\";\nimport { composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, formatWireName, parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\nimport { SqlQueryError } from \"@internal/sql-errors\";\nimport { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, makePslNamespace, makePslNamespaceEntries } from \"@internal/framework-components/psl-ast\";\nimport { mapDefault } from \"@internal/family-sql/psl-build\";\nimport { effectiveControlPolicy } from \"@internal/contract/types\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { pslFieldMapName, pslModelMapName } from \"@internal/sql-contract-psl/map-names\";\nimport { defaultForeignKeyIndex } from \"@internal/sql-contract/foreign-key-materialization\";\n//#region src/core/migrations/runner.ts\n/**\n* Deep clones and freezes a record object to prevent mutation.\n* Recursively clones nested objects and arrays to ensure complete isolation.\n*/\nfunction cloneAndFreezeRecord(value) {\n\tconst cloned = {};\n\tfor (const [key, val] of Object.entries(value)) if (val === null || val === void 0) cloned[key] = val;\n\telse if (Array.isArray(val)) cloned[key] = Object.freeze([...val]);\n\telse if (typeof val === \"object\") cloned[key] = cloneAndFreezeRecord(blindCast(val));\n\telse cloned[key] = val;\n\treturn blindCast(Object.freeze(cloned));\n}\nfunction createPostgresMigrationRunner(family) {\n\treturn new PostgresMigrationRunner(family);\n}\nvar PostgresMigrationRunner = class {\n\tfamily;\n\tconstructor(family) {\n\t\tthis.family = family;\n\t}\n\t/**\n\t* Body of the migration runner without transaction management. The\n\t* caller ({@link PostgresMigrationRunner.execute}) owns the\n\t* `BEGIN`/`COMMIT`/`ROLLBACK` lifecycle.\n\t*/\n\tasync executeOnConnection(options) {\n\t\tconst driver = options.driver;\n\t\tif (options.space !== void 0 && options.space !== options.plan.spaceId) throw postgresError(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", `SqlMigrationRunner: options.space (${options.space}) does not match plan.spaceId (${options.plan.spaceId})`, { meta: {\n\t\t\tspace: options.space,\n\t\t\tplanSpaceId: options.plan.spaceId\n\t\t} });\n\t\tconst space = options.plan.spaceId;\n\t\tconst planOps = blindCast(await Promise.all(options.plan.operations));\n\t\tconst destinationCheck = this.ensurePlanMatchesDestinationContract(options.plan.destination, options.destinationContract);\n\t\tif (!destinationCheck.ok) return destinationCheck;\n\t\tconst policyCheck = this.enforcePolicyCompatibility(options.policy, planOps);\n\t\tif (!policyCheck.ok) return policyCheck;\n\t\tawait this.acquireLock(driver);\n\t\tconst ensureResult = await this.ensureControlTables(driver, options.destinationContract);\n\t\tif (!ensureResult.ok) return ensureResult;\n\t\tconst existingMarker = await this.family.readMarker({\n\t\t\tdriver,\n\t\t\tspace\n\t\t});\n\t\tconst markerCheck = this.ensureMarkerCompatibility(existingMarker, options.plan);\n\t\tif (!markerCheck.ok) return markerCheck;\n\t\tconst markerAtDestination = this.markerMatchesDestination(existingMarker, options.plan);\n\t\tconst isSelfEdge = options.plan.origin?.storageHash === options.plan.destination.storageHash;\n\t\tconst skipOperations = markerAtDestination && options.plan.origin != null && !isSelfEdge;\n\t\tlet applyValue;\n\t\tif (skipOperations) applyValue = {\n\t\t\toperationsExecuted: 0,\n\t\t\texecutedOperations: []\n\t\t};\n\t\telse {\n\t\t\tconst applyResult = await this.applyPlan(driver, options, planOps);\n\t\t\tif (!applyResult.ok) return applyResult;\n\t\t\tapplyValue = applyResult.value;\n\t\t}\n\t\tif (space === APP_SPACE_ID) {\n\t\t\tconst schemaNode = await this.family.introspect({\n\t\t\t\tdriver,\n\t\t\t\tcontract: options.destinationContract\n\t\t\t});\n\t\t\tconst schemaVerifyResult = this.family.verifySchema({\n\t\t\t\tcontract: options.destinationContract,\n\t\t\t\tschema: schemaNode,\n\t\t\t\tstrict: options.strictVerification ?? true,\n\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t});\n\t\t\tif (!schemaVerifyResult.ok) return runnerFailure(\"MIGRATION.SCHEMA_VERIFY_FAILED\", schemaVerifyResult.summary, {\n\t\t\t\twhy: \"The resulting database schema does not satisfy the destination contract.\",\n\t\t\t\tmeta: { issues: schemaVerifyResult.schema.issues }\n\t\t\t});\n\t\t}\n\t\tconst incomingInvariants = options.plan.providedInvariants ?? [];\n\t\tconst existingInvariants = new Set(existingMarker?.invariants ?? []);\n\t\tconst incomingIsSubsetOfExisting = incomingInvariants.every((id) => existingInvariants.has(id));\n\t\tif (!(isSelfEdge && applyValue.operationsExecuted === 0 && incomingIsSubsetOfExisting)) {\n\t\t\tconst markerResult = await this.upsertMarker(driver, options, existingMarker, space);\n\t\t\tif (!markerResult.ok) return markerResult;\n\t\t\tawait this.recordLedgerEntries(driver, options, applyValue.executedOperations, planOps.length);\n\t\t}\n\t\treturn runnerSuccess({\n\t\t\toperationsPlanned: planOps.length,\n\t\t\toperationsExecuted: applyValue.operationsExecuted\n\t\t});\n\t}\n\tasync execute(options) {\n\t\tconst driver = options.driver;\n\t\tconst perSpaceOptions = options.perSpaceOptions;\n\t\tif (perSpaceOptions.length === 0) return ok({ perSpaceResults: [] });\n\t\tawait this.beginTransaction(driver);\n\t\tlet committed = false;\n\t\ttry {\n\t\t\tconst perSpaceResults = [];\n\t\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\t\tconst result = await this.executeOnConnection({\n\t\t\t\t\t...spaceOptions,\n\t\t\t\t\tdriver,\n\t\t\t\t\tspace\n\t\t\t\t});\n\t\t\t\tif (!result.ok) return notOk({\n\t\t\t\t\t...result.failure,\n\t\t\t\t\tfailingSpace: space\n\t\t\t\t});\n\t\t\t\tperSpaceResults.push({\n\t\t\t\t\tspace,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t}\n\t\t\tawait this.commitTransaction(driver);\n\t\t\tcommitted = true;\n\t\t\treturn ok({ perSpaceResults });\n\t\t} finally {\n\t\t\tif (!committed) await this.rollbackTransaction(driver);\n\t\t}\n\t}\n\tasync applyPlan(driver, options, ops) {\n\t\tconst checks = options.executionChecks;\n\t\tconst runPrechecks = checks?.prechecks !== false;\n\t\tconst runPostchecks = checks?.postchecks !== false;\n\t\tconst runIdempotency = checks?.idempotencyChecks !== false;\n\t\tlet operationsExecuted = 0;\n\t\tconst executedOperations = [];\n\t\tfor (const operation of ops) {\n\t\t\toptions.callbacks?.onOperationStart?.(operation);\n\t\t\ttry {\n\t\t\t\tif (runPostchecks && runIdempotency) {\n\t\t\t\t\tif (await this.expectationsAreSatisfied(driver, operation.postcheck)) {\n\t\t\t\t\t\texecutedOperations.push(this.createPostcheckPreSatisfiedSkipRecord(operation));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (runPrechecks) {\n\t\t\t\t\tconst precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, \"precheck\");\n\t\t\t\t\tif (!precheckResult.ok) return precheckResult;\n\t\t\t\t}\n\t\t\t\tconst executeResult = await this.runExecuteSteps(driver, operation.execute, operation);\n\t\t\t\tif (!executeResult.ok) return executeResult;\n\t\t\t\tif (runPostchecks) {\n\t\t\t\t\tconst postcheckResult = await this.runExpectationSteps(driver, operation.postcheck, operation, \"postcheck\");\n\t\t\t\t\tif (!postcheckResult.ok) return postcheckResult;\n\t\t\t\t}\n\t\t\t\texecutedOperations.push(operation);\n\t\t\t\toperationsExecuted += 1;\n\t\t\t} finally {\n\t\t\t\toptions.callbacks?.onOperationComplete?.(operation);\n\t\t\t}\n\t\t}\n\t\treturn ok({\n\t\t\toperationsExecuted,\n\t\t\texecutedOperations\n\t\t});\n\t}\n\tasync ensureControlTables(driver, contract) {\n\t\tconst lowererContext = { contract };\n\t\tconst [schemaQuery, ...tableQueries] = this.family.bootstrapControlTableQueries();\n\t\tif (schemaQuery === void 0) throw new InternalError(\"Postgres control-table bootstrap must include CREATE SCHEMA\");\n\t\tawait this.executeStatement(driver, await this.family.lowerAst(schemaQuery, lowererContext));\n\t\tconst legacyDetection = await this.detectLegacyMarkerShape(driver);\n\t\tif (!legacyDetection.ok) return legacyDetection;\n\t\tfor (const query of tableQueries) await this.executeStatement(driver, await this.family.lowerAst(query, lowererContext));\n\t\treturn okVoid();\n\t}\n\tasync detectLegacyMarkerShape(driver) {\n\t\tconst result = await driver.query(`select column_name\n from information_schema.columns\n where table_schema = 'prisma_contract'\n and table_name = 'marker'`);\n\t\tif (result.rows.length === 0) return okVoid();\n\t\tconst columns = new Set(result.rows.map((row) => row.column_name));\n\t\tif (columns.has(\"space\")) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.LEGACY_MARKER_SHAPE\", \"Legacy marker-table shape detected on prisma_contract.marker (no `space` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop `prisma_contract.marker` and re-run `dbInit` to reinitialise from a clean baseline.\", { meta: {\n\t\t\ttable: \"prisma_contract.marker\",\n\t\t\tcolumns: [...columns].sort()\n\t\t} });\n\t}\n\tasync runExpectationSteps(driver, steps, operation, phase) {\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return runnerFailure(phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\", `Operation ${operation.id} failed during ${phase}: ${step.description}`, { meta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\tphase,\n\t\t\t\tstepDescription: step.description\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync runExecuteSteps(driver, steps, operation) {\n\t\tfor (const step of steps) try {\n\t\t\tawait driver.query(step.sql, step.params ?? []);\n\t\t} catch (error) {\n\t\t\tif (SqlQueryError.is(error)) return runnerFailure(\"MIGRATION.EXECUTION_FAILED\", `Operation ${operation.id} failed during execution: ${step.description}`, {\n\t\t\t\twhy: error.message,\n\t\t\t\tmeta: {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tstepDescription: step.description,\n\t\t\t\t\tsql: step.sql,\n\t\t\t\t\tsqlState: error.sqlState,\n\t\t\t\t\tconstraint: error.constraint,\n\t\t\t\t\ttable: error.table,\n\t\t\t\t\tcolumn: error.column,\n\t\t\t\t\tdetail: error.detail\n\t\t\t\t}\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t\treturn okVoid();\n\t}\n\tstepResultIsTrue(rows) {\n\t\tif (!rows || rows.length === 0) return false;\n\t\tconst firstRow = rows[0];\n\t\tconst firstValue = firstRow ? Object.values(firstRow)[0] : void 0;\n\t\tif (typeof firstValue === \"boolean\") return firstValue;\n\t\tif (typeof firstValue === \"number\") return firstValue !== 0;\n\t\tif (typeof firstValue === \"string\") {\n\t\t\tconst lower = firstValue.toLowerCase();\n\t\t\tif (lower === \"t\" || lower === \"true\" || lower === \"1\") return true;\n\t\t\tif (lower === \"f\" || lower === \"false\" || lower === \"0\") return false;\n\t\t\treturn firstValue.length > 0;\n\t\t}\n\t\treturn Boolean(firstValue);\n\t}\n\tasync expectationsAreSatisfied(driver, steps) {\n\t\tif (steps.length === 0) return false;\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tcreatePostcheckPreSatisfiedSkipRecord(operation) {\n\t\tconst clonedMeta = operation.meta ? cloneAndFreezeRecord(operation.meta) : void 0;\n\t\tconst runnerMeta = Object.freeze({\n\t\t\tskipped: true,\n\t\t\treason: \"postcheck_pre_satisfied\"\n\t\t});\n\t\tconst mergedMeta = Object.freeze({\n\t\t\t...clonedMeta ?? {},\n\t\t\trunner: runnerMeta\n\t\t});\n\t\tconst frozenPostcheck = Object.freeze([...operation.postcheck]);\n\t\treturn Object.freeze({\n\t\t\tid: operation.id,\n\t\t\tlabel: operation.label,\n\t\t\t...ifDefined(\"summary\", operation.summary),\n\t\t\toperationClass: operation.operationClass,\n\t\t\ttarget: operation.target,\n\t\t\tprecheck: Object.freeze([]),\n\t\t\texecute: Object.freeze([]),\n\t\t\tpostcheck: frozenPostcheck,\n\t\t\t...ifDefined(\"meta\", operation.meta || mergedMeta ? mergedMeta : void 0)\n\t\t});\n\t}\n\tmarkerMatchesDestination(marker, plan) {\n\t\tif (!marker) return false;\n\t\tif (marker.storageHash !== plan.destination.storageHash) return false;\n\t\tif (plan.destination.profileHash && marker.profileHash !== plan.destination.profileHash) return false;\n\t\treturn true;\n\t}\n\tenforcePolicyCompatibility(policy, operations) {\n\t\tconst allowedClasses = new Set(policy.allowedOperationClasses);\n\t\tfor (const operation of operations) if (!allowedClasses.has(operation.operationClass)) return runnerFailure(\"MIGRATION.POLICY_VIOLATION\", `Operation ${operation.id} has class \"${operation.operationClass}\" which is not allowed by policy.`, {\n\t\t\twhy: `Policy only allows: ${policy.allowedOperationClasses.join(\", \")}.`,\n\t\t\tmeta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\toperationClass: operation.operationClass,\n\t\t\t\tallowedClasses: policy.allowedOperationClasses\n\t\t\t}\n\t\t});\n\t\treturn okVoid();\n\t}\n\tensureMarkerCompatibility(marker, plan) {\n\t\tconst origin = plan.origin ?? null;\n\t\tif (!origin) return okVoid();\n\t\tif (!marker) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });\n\t\tif (marker.storageHash !== origin.storageHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {\n\t\t\tmarkerStorageHash: marker.storageHash,\n\t\t\texpectedOriginStorageHash: origin.storageHash\n\t\t} });\n\t\tif (origin.profileHash && marker.profileHash !== origin.profileHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker profile hash (${marker.profileHash}) does not match plan origin profile hash (${origin.profileHash}).`, { meta: {\n\t\t\tmarkerProfileHash: marker.profileHash,\n\t\t\texpectedOriginProfileHash: origin.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tensurePlanMatchesDestinationContract(destination, contract) {\n\t\tif (destination.storageHash !== contract.storage.storageHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storage.storageHash}).`, { meta: {\n\t\t\tplanStorageHash: destination.storageHash,\n\t\t\tcontractStorageHash: contract.storage.storageHash\n\t\t} });\n\t\tif (destination.profileHash && contract.profileHash && destination.profileHash !== contract.profileHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination profile hash (${destination.profileHash}) does not match provided contract profile hash (${contract.profileHash}).`, { meta: {\n\t\t\tplanProfileHash: destination.profileHash,\n\t\t\tcontractProfileHash: contract.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tasync upsertMarker(driver, options, existingMarker, space) {\n\t\tconst destination = {\n\t\t\tstorageHash: options.plan.destination.storageHash,\n\t\t\tprofileHash: options.plan.destination.profileHash ?? options.destinationContract.profileHash ?? options.plan.destination.storageHash,\n\t\t\tinvariants: options.plan.providedInvariants ?? []\n\t\t};\n\t\tif (!existingMarker) {\n\t\t\tawait this.family.initMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tdestination\n\t\t\t});\n\t\t\treturn okVoid();\n\t\t}\n\t\tif (!await this.family.updateMarker({\n\t\t\tdriver,\n\t\t\tspace,\n\t\t\texpectedFrom: existingMarker.storageHash,\n\t\t\tdestination\n\t\t})) {\n\t\t\tconst found = await this.family.readMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace\n\t\t\t});\n\t\t\treturn runnerFailure(\"MIGRATION.MARKER_CAS_FAILURE\", \"Marker was modified by another process during migration execution.\", { meta: {\n\t\t\t\tspace,\n\t\t\t\texpectedStorageHash: existingMarker.storageHash,\n\t\t\t\tfoundStorageHash: found?.storageHash ?? null,\n\t\t\t\tdestinationStorageHash: options.plan.destination.storageHash\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync recordLedgerEntries(driver, options, executedOperations, planOpsLength) {\n\t\tconst space = options.plan.spaceId;\n\t\tconst edges = options.migrationEdges;\n\t\tconst totalEdgeOps = edges.reduce((sum, edge) => sum + edge.operationCount, 0);\n\t\tif (totalEdgeOps !== planOpsLength) throw new InternalError(`Ledger write: plan.operations length (${planOpsLength}) does not match sum of migrationEdges operationCount (${totalEdgeOps})`);\n\t\tlet offset = 0;\n\t\tfor (const edge of edges) {\n\t\t\tconst edgeOps = executedOperations.slice(offset, offset + edge.operationCount);\n\t\t\toffset += edge.operationCount;\n\t\t\tawait this.family.writeLedgerEntry({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tentry: {\n\t\t\t\t\tedgeId: `${edge.from}->${edge.to}`,\n\t\t\t\t\tfrom: edge.from,\n\t\t\t\t\tto: edge.to,\n\t\t\t\t\tmigrationName: edge.dirName,\n\t\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\t\toperations: edgeOps,\n\t\t\t\t\t...ifDefined(\"destinationContractJson\", edge.destinationContractJson)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tasync acquireLock(driver) {\n\t\tawait driver.query(MARKER_LOCK_SQL, [MARKER_LOCK_KEY]);\n\t}\n\tasync beginTransaction(driver) {\n\t\tawait driver.query(\"BEGIN\");\n\t}\n\tasync commitTransaction(driver) {\n\t\tawait driver.query(\"COMMIT\");\n\t}\n\tasync rollbackTransaction(driver) {\n\t\tawait driver.query(\"ROLLBACK\");\n\t}\n\tasync executeStatement(driver, statement) {\n\t\tawait driver.query(statement.sql, statement.params);\n\t}\n};\n//#endregion\n//#region src/core/postgres-schema-verifier.ts\n/**\n* Postgres target `SchemaVerifier` concretion. Plugs into the\n* SQL-shared verification surface; production verification today still\n* routes through the family verify verdict (`verifySqlSchemaByDiff` over\n* `diffPostgresSchema`), which carries options (codec hooks,\n* normalizers, framework components) that the framework-level\n* `SchemaVerifyOptions` shape does not yet surface.\n*\n* The hooks return the empty list pending the call-site migration that\n* routes the existing verifier behaviour through the SPI — at that\n* point `verifyCommonSqlSchema` will likely lift onto the family base\n* (mirroring `verifyCommonMongoSchema`) and `verifyTargetExtensions`\n* will house Postgres-only kinds (functions, RLS policies in a future\n* project).\n*/\nvar PostgresSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/psl-print/contract-model-index.ts\n/** The name a contract namespace is written under in PSL. */\nfunction pslNamespaceName(namespaceId) {\n\treturn namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_PSL_NAMESPACE_NAME : namespaceId;\n}\nfunction modelCoordinate(namespaceId, modelName) {\n\treturn JSON.stringify([namespaceId, modelName]);\n}\n/**\n* Every domain model of the contract, in declaration order, with its storage table. Contract\n* validation has checked that each model's table exists, in the namespace of the model.\n*/\nfunction indexContractModels(contract) {\n\tconst entries = [];\n\tfor (const [namespaceId, domainNamespace] of Object.entries(contract.domain.namespaces)) for (const [name, model] of Object.entries(domainNamespace.models)) {\n\t\tconst storage = blindCast(model.storage);\n\t\tconst table = contract.storage.namespaces[storage.namespaceId]?.entries.table?.[storage.table];\n\t\tassertDefined(table, `model \"${namespaceId}.${name}\" is stored in table \"${storage.namespaceId}\".\"${storage.table}\", which the storage does not declare`);\n\t\tconst fields = Object.entries(storage.fields);\n\t\tentries.push({\n\t\t\tnamespaceId: storage.namespaceId,\n\t\t\tname,\n\t\t\ttableName: storage.table,\n\t\t\tstorage,\n\t\t\tmodel,\n\t\t\ttable,\n\t\t\tfieldNamesByColumn: new Map(fields.map(([fieldName, field]) => [field.column, fieldName])),\n\t\t\townColumns: new Set(fields.map(([, field]) => field.column))\n\t\t});\n\t}\n\treturn entries;\n}\n/** Models keyed by their `(namespace, model)` coordinate. */\nfunction modelsByCoordinate(entries) {\n\treturn new Map(entries.map((entry) => [modelCoordinate(entry.namespaceId, entry.name), entry]));\n}\n/** A cross reference's coordinate; one into another contract space never matches a model of this contract. */\nfunction crossReferenceCoordinate(reference) {\n\treturn reference.space === void 0 ? modelCoordinate(reference.namespace, reference.model) : JSON.stringify([\n\t\treference.space,\n\t\treference.namespace,\n\t\treference.model\n\t]);\n}\n/** The base a variant model extends, with the discriminator value it is stored under. */\nfunction variantInfo(entry, byCoordinate) {\n\tif (entry.model.base === void 0) return void 0;\n\tconst base = byCoordinate.get(crossReferenceCoordinate(entry.model.base));\n\tconst value = base?.model.variants?.[entry.name]?.value;\n\tassertDefined(base, `model \"${entry.namespaceId}.${entry.name}\" extends a base the contract does not declare`);\n\tassertDefined(value, `model \"${entry.namespaceId}.${entry.name}\" extends base \"${base.name}\", which does not list it as a variant`);\n\treturn {\n\t\tbase,\n\t\tvalue,\n\t\tsingleTable: base.namespaceId === entry.namespaceId && base.tableName === entry.tableName\n\t};\n}\n/** The columns the PSL source adds to a multi-table variant's table: its base's primary key. */\nfunction variantLinkColumns(entry, variant) {\n\tif (variant === void 0 || variant.singleTable) return [];\n\treturn (variant.base.table.primaryKey?.columns ?? []).filter((column) => !entry.ownColumns.has(column));\n}\n/**\n* The foreign key the PSL source synthesizes from a multi-table variant to its base: unnamed, over\n* the base's primary key columns, cascading on delete.\n*/\nfunction isVariantLinkForeignKey(fk, variant) {\n\tif (variant === void 0 || variant.singleTable) return false;\n\tconst baseKey = canonicalizeJson(variant.base.table.primaryKey?.columns ?? []);\n\treturn fk.target.namespaceId === variant.base.namespaceId && fk.target.tableName === variant.base.tableName && fk.target.spaceId === void 0 && canonicalizeJson(fk.source.columns) === baseKey && canonicalizeJson(fk.target.columns) === baseKey && fk.name === void 0 && fk.onDelete === \"cascade\" && fk.onUpdate === void 0;\n}\n//#endregion\n//#region src/core/psl-print/refusals.ts\nconst KEEP_SOURCE = \"Keep authoring this contract in its current source.\";\nfunction unsupported(message, why, fix, meta) {\n\treturn postgresError(\"CONTRACT.PRINT_UNSUPPORTED\", `contract print: ${message}`, {\n\t\twhy,\n\t\tfix,\n\t\tmeta\n\t});\n}\nfunction sameJson(left, right) {\n\treturn canonicalizeJson(left) === canonicalizeJson(right);\n}\nfunction sameValues$1(left, right) {\n\treturn left.length === right.length && left.every((value, index) => value === right[index]);\n}\nfunction refuseColumnWithoutPslType(column, coordinate) {\n\tthrow unsupported(`column ${coordinate} has data type \"${column.dataType}\" with codec \"${column.codecId}\", and no PSL type in the configured stack produces that pair.`, \"A column is written as a PSL type that reads back with its codec and data type, and none of the types the target, adapter and extensions contribute does.\", \"Add the extension that contributes this type to the config, or keep authoring this contract in its current source.\", {\n\t\tcoordinate,\n\t\tdataType: column.dataType,\n\t\tcodecId: column.codecId\n\t});\n}\n/**\n* Refuses a string type argument the PSL source would read back differently: it reads a string\n* argument between its quotes as written, with no escapes.\n*/\nfunction refuseUnwritableTypeArgument(value, coordinate) {\n\tif (escapePslString(value) === value) return;\n\tthrow unsupported(`column ${coordinate} takes the type argument ${JSON.stringify(value)}, which a PSL type argument cannot carry.`, \"The PSL source reads a string type argument as written between its quotes, with no escapes, so a quote, backslash or line break in it would read back differently.\", KEEP_SOURCE, {\n\t\tcoordinate,\n\t\targument: value\n\t});\n}\nfunction refuseDefaultOutsideEnum(input) {\n\tthrow unsupported(`column ${input.coordinate} defaults to ${JSON.stringify(input.value)}, which is not a member of enum ${input.pslTypeName}.`, \"A default on a domain enum column is written as the member name, and no member carries this value.\", \"Give the column a default that is one of the enum members, or drop it.\", {\n\t\tcoordinate: input.coordinate,\n\t\tpslTypeName: input.pslTypeName\n\t});\n}\nfunction refuseUnwritableLiteralDefault(input) {\n\tthrow unsupported(`column ${input.coordinate} has a default that cannot be written in Prisma 8 PSL: no data type the ${input.pslTypeName} type takes writes ${input.written}.`, \"Writing the value in any other form would parse, but the PSL source would read it back as a different value.\", \"Replace the default with a database expression default, or drop the default before printing.\", {\n\t\tcoordinate: input.coordinate,\n\t\tpslTypeName: input.pslTypeName\n\t});\n}\nfunction refuseNowGeneratorPairedWithAnother(phases) {\n\tthrow unsupported(`column ${phases.coordinate} takes the wall-clock-now generator in one phase and \"${phases.other}\" in the other, which cannot be written in Prisma 8 PSL.`, \"The temporal preset a now generator is authored through writes each phase as `now`, so the other generator would be dropped from the written file.\", KEEP_SOURCE, {\n\t\tcoordinate: phases.coordinate,\n\t\tonCreate: phases.onCreate,\n\t\tonUpdate: phases.onUpdate\n\t});\n}\nfunction refuseGeneratorOnUpdate(phases) {\n\tthrow unsupported(`column ${phases.coordinate} generates a value on update (\"${phases.onUpdate}\"), which cannot be written in Prisma 8 PSL.`, \"`@default(…)` writes a generator for create only; a generator on update is written only through a temporal preset, which takes the wall-clock-now generator.\", KEEP_SOURCE, {\n\t\tcoordinate: phases.coordinate,\n\t\tonCreate: phases.onCreate,\n\t\tonUpdate: phases.onUpdate\n\t});\n}\nfunction refuseGeneratorWithoutPslFunction(phases) {\n\tthrow unsupported(`column ${phases.coordinate} is generated by \"${phases.onCreate}\", and the printer knows no PSL default function that produces it.`, \"The printer writes each generator as the PSL default function of the Postgres adapter that produces it, and no such function produces this generator.\", KEEP_SOURCE, {\n\t\tcoordinate: phases.coordinate,\n\t\tonCreate: phases.onCreate,\n\t\tonUpdate: phases.onUpdate\n\t});\n}\nfunction refuseGeneratorWithDatabaseDefault(input) {\n\tthrow unsupported(`column ${input.coordinate} has both a generated value (\"${input.onCreate}\") and a database default, which cannot be written in Prisma 8 PSL.`, \"`@default(…)` writes either the generator or the database default, so the other would be lost.\", \"Drop one of the two, or keep authoring this contract in its current source.\", {\n\t\tcoordinate: input.coordinate,\n\t\tonCreate: input.onCreate\n\t});\n}\n/** Refuses a generated value the printer did not write with the field of its column. */\nfunction refuseUnwrittenExecutionDefaults(contract, written) {\n\tfor (const entry of contract.execution?.mutations.defaults ?? []) {\n\t\tif (written.has(entry)) continue;\n\t\tconst coordinate = `\"${entry.ref.namespace}\".\"${entry.ref.entry}\".\"${entry.ref.field}\"`;\n\t\tthrow unsupported(`a generated value names column ${coordinate}, which no field is stored in, so it cannot be written in Prisma 8 PSL.`, \"PSL writes a generated value on the field stored in its column.\", KEEP_SOURCE, { coordinate });\n\t}\n}\n/**\n* The value-set references the PSL source gives a field typed by a domain enum, one per plane: the\n* domain names the enum and the storage column names the enum's value set, both in the default\n* namespace. A field with no domain enum has neither.\n*/\nfunction derivedValueSetRefs(enumName) {\n\tif (enumName === void 0) return {\n\t\tdomain: void 0,\n\t\tstorage: void 0\n\t};\n\tconst common = {\n\t\tnamespaceId: DEFAULT_NAMESPACE_ID,\n\t\tentityName: enumName\n\t};\n\treturn {\n\t\tdomain: {\n\t\t\tplane: \"domain\",\n\t\t\tentityKind: \"enum\",\n\t\t\t...common\n\t\t},\n\t\tstorage: {\n\t\t\tplane: \"storage\",\n\t\t\tentityKind: \"valueSet\",\n\t\t\t...common\n\t\t}\n\t};\n}\n/**\n* Refuses a field whose column the PSL source would not derive from it: PSL writes the field once,\n* and the PSL source derives the column's nullability, list marker, codec and type parameters from\n* what is written.\n*/\nfunction refuseFieldColumnMismatch(input) {\n\tconst { field, column, coordinate } = input;\n\tconst fix = \"Make the field and its column agree, or keep authoring this contract in its current source.\";\n\tconst fixForEarlierRelease = `If an earlier release emitted this contract, emit it again. ${fix}`;\n\tif (input.singleTableVariant && !column.nullable) throw unsupported(`column ${coordinate} of single-table variant \"${input.modelName}\" is not nullable, which cannot be written in Prisma 8 PSL.`, \"The PSL source makes every column of a single-table variant nullable, because the base's other rows leave it empty.\", fix, { coordinate });\n\tif (!input.singleTableVariant && field.nullable !== column.nullable) throw unsupported(`field ${coordinate} is ${field.nullable ? \"optional\" : \"required\"} but its column is ${column.nullable ? \"nullable\" : \"not nullable\"}, which cannot be written in Prisma 8 PSL.`, \"PSL writes `?` once, and the PSL source derives the column from the field.\", fix, { coordinate });\n\tif ((field.type.kind === \"scalar\" && !!field.many) !== (column.many !== false)) throw unsupported(`field ${coordinate} is ${field.many ? \"a list\" : \"not a list\"} but its column is ${column.many !== false ? \"a list\" : \"not a list\"}, which cannot be written in Prisma 8 PSL.`, \"PSL writes `[]` once: the PSL source stores a list of scalars in a list column, and a list of value objects in one JSON column.\", fix, { coordinate });\n\tif (field.type.kind === \"scalar\" && (field.type.codecId !== column.codecId || !sameJson(resolvedTypeParams(field.type, void 0), resolvedTypeParams(column, input.namedTypes)))) throw unsupported(`field ${coordinate} has a different codec or type parameters from its column, which cannot be written in Prisma 8 PSL.`, \"The PSL source derives a scalar field's codec and type parameters from its column.\", fixForEarlierRelease, { coordinate });\n\tif (field.type.kind !== \"scalar\" || column.codecId === \"pg/enum@1\") return;\n\tconst enumName = column.valueSet?.entityName;\n\tconst derived = derivedValueSetRefs(enumName);\n\tif (!sameJson(field.valueSet, derived.domain) || !sameJson(column.valueSet, derived.storage) || enumName !== void 0 && !input.domainEnumNames.has(enumName)) throw unsupported(`field ${coordinate} and its column do not name the enum of the default namespace and its value set that the PSL source derives for a field typed by an enum, which cannot be written in Prisma 8 PSL.`, \"PSL types the field by the enum name, and the PSL source then points the column at the value set of that enum in the default namespace, and the field at the enum.\", fixForEarlierRelease, { coordinate });\n}\n/**\n* Refuses a field PSL has no form for: one whose type is a union of types, or one that is a\n* dictionary. Runs for model fields and value-object members alike.\n*/\nfunction refuseUnwritableFieldShape(field, coordinate) {\n\tif (field.type.kind === \"union\") throw unsupported(`field ${coordinate} has a ${field.type.kind} type, which cannot be written in Prisma 8 PSL.`, \"A PSL field names one scalar, enum, or value-object type; a union of types has no PSL form.\", \"Give the field a single type, or keep authoring this contract in its current source.\", {\n\t\tcoordinate,\n\t\tkind: field.type.kind\n\t});\n\tif (field.dict !== true) return;\n\tthrow unsupported(`field ${coordinate} is a dictionary, which cannot be written in Prisma 8 PSL.`, \"PSL writes a field as one value or a list; it has no form for a keyed dictionary.\", KEEP_SOURCE, { coordinate });\n}\n/**\n* Refuses a value-object member with a value set other than the one the PSL source derives for a member typed by an enum: the enum of the default namespace, with the enum's codec and no type parameters.\n*/\nfunction refuseUnderivedMemberValueSet(input) {\n\tconst { field, type, coordinate } = input;\n\tconst { valueSet } = field;\n\tif (valueSet === void 0) return;\n\tconst domainEnum = input.domainEnums[valueSet.entityName];\n\tif (sameJson(valueSet, derivedValueSetRefs(valueSet.entityName).domain) && domainEnum?.codecId === type.codecId && type.typeParams === void 0) return;\n\tthrow unsupported(`value-object member ${coordinate} carries a value set other than an enum of the default namespace with that enum's codec and no type parameters, which cannot be written in Prisma 8 PSL.`, \"PSL types the member by the enum name, and the PSL source then points the member at that enum in the default namespace and gives it the enum's codec.\", KEEP_SOURCE, { coordinate });\n}\nfunction refuseMemberCodecWithoutNativeType(codecId, coordinate) {\n\tthrow unsupported(`value-object member ${coordinate} uses codec \"${codecId}\", which no Postgres codec in the configured stack names a native type for.`, \"A value-object member has no storage column, so its PSL type is derived from the native type its codec names.\", KEEP_SOURCE, {\n\t\tcoordinate,\n\t\tcodecId\n\t});\n}\nfunction refuseMemberCodecNeedingTypeParameters(codecId, coordinate) {\n\tthrow unsupported(`value-object member ${coordinate} uses codec \"${codecId}\", which names a native type only from type parameters the member does not carry.`, \"A value-object member has no storage column, so its PSL type is derived from the native type its codec names for its type parameters.\", KEEP_SOURCE, {\n\t\tcoordinate,\n\t\tcodecId\n\t});\n}\n/** Refuses a model field its storage does not store in a column. */\nfunction refuseFieldsWithoutColumn(entry) {\n\tconst storedFieldNames = new Set(Object.keys(entry.storage.fields));\n\tfor (const fieldName of Object.keys(entry.model.fields)) {\n\t\tif (storedFieldNames.has(fieldName)) continue;\n\t\tthrow unsupported(`field \"${entry.namespaceId}.${entry.name}.${fieldName}\" is stored in no column, so it cannot be written in Prisma 8 PSL.`, \"PSL declares a scalar or value-object field together with the column it is stored in.\", \"The contract source produced a field without storage. Fix the field if the source is a TypeScript contract; otherwise report the bug to the source that produced it.\", {\n\t\t\tnamespaceId: entry.namespaceId,\n\t\t\tmodelName: entry.name,\n\t\t\tfield: fieldName\n\t\t});\n\t}\n}\n/** Refuses a column a model stores under a field name the model does not declare. */\nfunction refuseStorageOfUndeclaredField(input) {\n\tconst { entry, fieldName } = input;\n\tthrow unsupported(`model \"${entry.namespaceId}.${entry.name}\" stores \"${fieldName}\" in column ${input.coordinate}, but the model has no field of that name, so it cannot be written in Prisma 8 PSL.`, \"PSL declares a field together with the column it is stored in.\", \"Declare the field on the model, or keep authoring this contract in its current source.\", {\n\t\tnamespaceId: entry.namespaceId,\n\t\tmodelName: entry.name,\n\t\tfield: fieldName\n\t});\n}\n/**\n* Refuses a column typed by a named type when the contract declares no such type, or when the\n* column's data type or codec is not the named type's. PSL writes the column as the name of the\n* type, and the PSL source copies both from the named type.\n*/\nfunction refuseColumnDifferingFromNamedType(input) {\n\tconst { column, typeRef, namedType, coordinate } = input;\n\tif (namedType?.dataType === column.dataType && namedType.codecId === column.codecId) return;\n\tthrow unsupported(namedType === void 0 ? `column ${coordinate} is typed by the named type \"${typeRef}\", which the contract does not declare, so it cannot be written in Prisma 8 PSL.` : `column ${coordinate} is typed by the named type \"${typeRef}\" but has a different data type or codec from it, which cannot be written in Prisma 8 PSL.`, \"PSL writes such a column as the name of its named type, and the PSL source gives the column the data type and codec of that named type.\", \"Make the column and its named type agree, or keep authoring this contract in its current source.\", {\n\t\tcoordinate,\n\t\ttypeRef\n\t});\n}\nfunction refuseColumnControl(column, coordinate) {\n\tif (column.control === void 0) return;\n\tthrow unsupported(`column ${coordinate} carries its own control policy \"${column.control}\", which cannot be written in Prisma 8 PSL.`, \"PSL declares a control policy per model with `@@control`; a field has no control attribute.\", \"Move the policy to the model, or keep authoring this contract in its current source.\", {\n\t\tcoordinate,\n\t\tcontrol: column.control\n\t});\n}\n/** Refuses a storage table no model is stored in, and a column no field or variant link stores. */\nfunction refuseUnmodelledTablesAndColumns(contract, models, variants) {\n\tconst tableKey = (namespaceId, tableName) => JSON.stringify([namespaceId, tableName]);\n\tconst coveredColumns = /* @__PURE__ */ new Map();\n\tfor (const entry of models) {\n\t\tconst key = tableKey(entry.namespaceId, entry.tableName);\n\t\tconst columns = coveredColumns.get(key) ?? /* @__PURE__ */ new Set();\n\t\tfor (const column of entry.ownColumns) columns.add(column);\n\t\tfor (const column of variantLinkColumns(entry, variants.get(entry))) columns.add(column);\n\t\tcoveredColumns.set(key, columns);\n\t}\n\tfor (const [namespaceId, namespace] of Object.entries(contract.storage.namespaces)) for (const [tableName, table] of Object.entries(namespace.entries.table ?? {})) {\n\t\tconst covered = coveredColumns.get(tableKey(namespaceId, tableName));\n\t\tif (covered === void 0) throw unsupported(`table \"${namespaceId}\".\"${tableName}\" has no model stored in it, so it cannot be written in Prisma 8 PSL.`, \"PSL declares a table through the model stored in it.\", \"Declare a model for the table, or keep authoring this contract in its current source.\", {\n\t\t\tnamespaceId,\n\t\t\ttable: tableName\n\t\t});\n\t\tfor (const column of Object.keys(table.columns)) {\n\t\t\tif (covered.has(column)) continue;\n\t\t\tthrow unsupported(`column \"${namespaceId}\".\"${tableName}\".\"${column}\" is not stored by any field, so it cannot be written in Prisma 8 PSL.`, \"PSL declares a column through the field stored in it; the only columns the PSL source adds are the primary key columns that link a multi-table variant to its base.\", \"Add a field for the column, or keep authoring this contract in its current source.\", {\n\t\t\t\tnamespaceId,\n\t\t\t\ttable: tableName,\n\t\t\t\tcolumn\n\t\t\t});\n\t\t}\n\t}\n}\nfunction refuseModelOwner(entry) {\n\tif (entry.model.owner === void 0) return;\n\tthrow unsupported(`model \"${entry.namespaceId}.${entry.name}\" is owned by \"${entry.model.owner}\", which cannot be written in Prisma 8 PSL.`, \"`owner` names the model this model is embedded in, and SQL PSL has no syntax for an owned model.\", KEEP_SOURCE, {\n\t\tnamespaceId: entry.namespaceId,\n\t\tmodelName: entry.name,\n\t\towner: entry.model.owner\n\t});\n}\n/**\n* Refuses a multi-table variant whose link to its base differs from the one the PSL source derives:\n* the base's primary key columns copied into the variant's table as its unnamed primary key, and\n* the link foreign key.\n*/\nfunction refuseUnderivedVariantLink(entry, variant) {\n\tconst baseKey = variant.base.table.primaryKey?.columns ?? [];\n\tconst derivedKey = baseKey.length === 0 ? void 0 : { columns: baseKey };\n\tconst linkColumnsMatch = variantLinkColumns(entry, variant).every((column) => {\n\t\tconst base = variant.base.table.columns[column];\n\t\tconst expected = base === void 0 ? void 0 : new StorageColumn({\n\t\t\tdataType: base.dataType,\n\t\t\tcodecId: base.codecId,\n\t\t\tnullable: false,\n\t\t\t...ifDefined(\"typeParams\", base.typeParams),\n\t\t\t...ifDefined(\"typeRef\", base.typeRef)\n\t\t});\n\t\treturn sameJson(entry.table.columns[column], expected);\n\t});\n\tconst linkForeignKeys = entry.table.foreignKeys.filter((fk) => isVariantLinkForeignKey(fk, variant));\n\tif (linkColumnsMatch && sameJson(entry.table.primaryKey, derivedKey) && linkForeignKeys.length === (baseKey.length === 0 ? 0 : 1)) return;\n\tthrow unsupported(`multi-table variant \"${entry.namespaceId}.${entry.name}\" is linked to its base \"${variant.base.name}\" differently from the link the PSL source derives, so it cannot be written in Prisma 8 PSL.`, \"The PSL source links a multi-table variant to its base itself: it copies the base's primary key columns into the variant's table as its unnamed primary key, and adds an unnamed foreign key over them to the base that cascades on delete.\", KEEP_SOURCE, {\n\t\tnamespaceId: entry.namespaceId,\n\t\tmodelName: entry.name\n\t});\n}\n/**\n* The PSL source groups relations by bare model name, so two models with the same name in\n* different namespaces would get each other's relations.\n*/\nfunction refuseDuplicateModelNames(models) {\n\tconst namespacesByName = /* @__PURE__ */ new Map();\n\tfor (const entry of models) {\n\t\tconst namespaces = namespacesByName.get(entry.name) ?? [];\n\t\tnamespaces.push(entry.namespaceId);\n\t\tnamespacesByName.set(entry.name, namespaces);\n\t}\n\tfor (const [name, namespaces] of namespacesByName) {\n\t\tif (namespaces.length <= 1) continue;\n\t\tthrow unsupported(`model \"${name}\" is declared in more than one namespace (${namespaces.join(\", \")}), which Prisma 8 PSL cannot carry: the PSL source groups relations by bare model name.`, \"The PSL source groups relations by bare model name, so when the file is read back the two models would get each other's relations.\", \"Rename one of the models, then print again.\", {\n\t\t\tmodelName: name,\n\t\t\tnamespaces\n\t\t});\n\t}\n}\n/**\n* A PSL `enum` block is declared at the top level and lands in the default namespace, so only the\n* default namespace's domain enums have a PSL form.\n*/\nfunction refuseEnumsOutsideDefaultNamespace(contract) {\n\tfor (const [namespaceId, domainNamespace] of Object.entries(contract.domain.namespaces)) {\n\t\tconst names = Object.keys(domainNamespace.enum ?? {});\n\t\tif (namespaceId === \"public\" || names.length === 0) continue;\n\t\tthrow unsupported(`namespace \"${namespaceId}\" declares the enum${names.length === 1 ? \"\" : \"s\"} ${names.join(\", \")}, which cannot be written in Prisma 8 PSL: an enum block is declared at the top level and belongs to the default namespace.`, \"The PSL source refuses an enum block inside a namespace block, so an enum outside the default namespace has no PSL form.\", \"Move the enum to the default namespace, or keep authoring this contract in its current source.\", {\n\t\t\tnamespaceId,\n\t\t\tnames\n\t\t});\n\t}\n}\n/** The PSL source reads every `type` block into the default namespace. */\nfunction refuseValueObjectsOutsideDefaultNamespace(contract, namespaceId) {\n\tconst names = Object.keys(contract.domain.namespaces[namespaceId]?.valueObjects ?? {});\n\tif (namespaceId === \"public\" || names.length === 0) return;\n\tthrow unsupported(`namespace \"${namespaceId}\" declares the value object${names.length === 1 ? \"\" : \"s\"} ${names.join(\", \")}, which cannot be written in Prisma 8 PSL: the PSL source reads every value object into the default namespace.`, \"A `type` block written in any namespace reads back into the default namespace, so the value object would move.\", \"Move the value object to the default namespace, or keep authoring this contract in its current source.\", {\n\t\tnamespaceId,\n\t\tnames\n\t});\n}\n/**\n* Refuses a check or index whose name is neither its prefix followed by the hash of its content,\n* which `name:` derives, nor free of a prefix, which `map:` needs.\n*/\nfunction refuseUnwritableObjectName(input) {\n\tconst { kind, entry, name, prefix } = input;\n\tthrow unsupported(`${kind} \"${name}\" on \"${entry.namespaceId}\".\"${entry.tableName}\" has the prefix \"${prefix}\", but its name is not that prefix followed by the hash of its ${kind === \"check\" ? \"expression\" : \"content\"}, so it cannot be written in Prisma 8 PSL.`, `\\`name:\\` makes the PSL source derive the name from the prefix and that hash, and \\`map:\\` writes an exact name with no prefix, so neither reads back as this ${kind}.`, KEEP_SOURCE, {\n\t\tnamespaceId: entry.namespaceId,\n\t\ttable: entry.tableName,\n\t\tname,\n\t\tprefix\n\t});\n}\n/**\n* Refuses a table whose checks differ from the derived ones where they overlap: a derived check the\n* table lacks, or a check with a derived check's name but not its prefix and expression. The PSL\n* source adds the derived checks itself, so they are never written.\n*/\nfunction refuseUnderivedChecks(entry, derived) {\n\tconst checks = new Map((entry.table.checks ?? []).map((check) => [check.name, check]));\n\tfor (const [name, expected] of derived) {\n\t\tconst check = checks.get(name);\n\t\tif (check?.prefix === expected.prefix && check.expression === expected.expression) continue;\n\t\tthrow unsupported(`table \"${entry.namespaceId}\".\"${entry.tableName}\" ${check === void 0 ? \"lacks\" : \"changes\"} the check \"${name}\" the PSL source derives, so it cannot be written in Prisma 8 PSL.`, \"The PSL source derives a membership check for each column of a managed table typed by an enum, and an element-not-null check for each list column, unless the column waives it with `@noCheck`.\", KEEP_SOURCE, {\n\t\t\tnamespaceId: entry.namespaceId,\n\t\t\ttable: entry.tableName,\n\t\t\tname\n\t\t});\n\t}\n}\n/**\n* Refuses index options PSL cannot write: `options:` takes string values under identifier keys,\n* and requires a `type`.\n*/\nfunction refuseUnwritableIndexOptions(entry, index) {\n\tconst meta = {\n\t\tnamespaceId: entry.namespaceId,\n\t\ttable: entry.tableName,\n\t\tindex: index.name\n\t};\n\tif (index.options !== void 0 && index.type === void 0) throw unsupported(`index \"${index.name}\" on \"${entry.namespaceId}\".\"${entry.tableName}\" has options but no type, which cannot be written in Prisma 8 PSL.`, \"The PSL source reads `options:` on an index only together with `type:`.\", \"Give the index a type, or keep authoring this contract in its current source.\", meta);\n\tfor (const [key, value] of Object.entries(index.options ?? {})) {\n\t\trefuseUnwritableName(\"index option\", key);\n\t\tif (typeof value === \"string\") continue;\n\t\tthrow unsupported(`index \"${index.name}\" on \"${entry.namespaceId}\".\"${entry.tableName}\" has option \"${key}\" whose value is not a string, which cannot be written in Prisma 8 PSL.`, \"The PSL `options:` argument takes string values only, and reads every value back as a string.\", \"Write the option value as a string, or keep authoring this contract in its current source.\", {\n\t\t\t...meta,\n\t\t\tkey\n\t\t});\n\t}\n}\n/**\n* Refuses an index, check or policy whose SQL a `sql` literal cannot write back unchanged, because\n* reading the literal canonicalizes it into different text.\n*/\nfunction refuseSqlTextThatDoesNotReadBack(input) {\n\tif (sqlTextsReadBack(input.texts)) return;\n\tconst { kind, namespaceId, table, name } = input;\n\tthrow unsupported(`${kind} \"${name}\" on \"${namespaceId}\".\"${table}\" holds SQL that a sql literal cannot write back unchanged, so it cannot be written in Prisma 8 PSL.`, \"A sql literal is canonicalized when it is read: indentation shared by every line, blank lines at the start or end, a carriage return and a whitespace-only line are removed, so this text would read back as different SQL.\", \"Write the SQL in that canonical form in the contract's source, or keep authoring this contract in its current source.\", kind === \"policy\" ? {\n\t\tnamespaceId,\n\t\ttable,\n\t\tpolicy: name\n\t} : {\n\t\tnamespaceId,\n\t\ttable,\n\t\tname\n\t});\n}\nfunction refuseToOneRelationWithoutForeignKey(modelName, fieldName) {\n\tthrow unsupported(`relation \"${modelName}.${fieldName}\" has no foreign key in storage, which Prisma 8 PSL cannot express.`, \"A to-one relation is authored as `@relation(fields:…, references:…)`, which always lowers to a foreign key.\", \"Declare a foreign key for the relation, or keep authoring this contract in its current source.\", {\n\t\tmodel: modelName,\n\t\tfield: fieldName\n\t});\n}\n/**\n* A foreign key backed by a primary key or unique constraint that only starts with its columns is written as the relation's `index: \"<name>\"`, which needs the key's name; the contract states none.\n*/\nfunction refuseUnnamedForeignKeyBacking(modelName, fieldName) {\n\tthrow unsupported(`relation \"${modelName}.${fieldName}\" is backed by a key with no name, which its @relation cannot name.`, \"The key's first columns are the foreign key's, but it has more columns, so a relation that names nothing would get its own backing index instead.\", \"Give the key a name, or keep authoring this contract in its current source.\", {\n\t\tmodel: modelName,\n\t\tfield: fieldName\n\t});\n}\n/**\n* A foreign key no relation travels has no PSL form: the PSL source derives every foreign key from\n* a `@relation`, so this one would be lost.\n*/\nfunction refuseUntravelledForeignKeys(entry, variant, travelled) {\n\tfor (const fk of entry.table.foreignKeys) {\n\t\tif (travelled.has(fk) || isVariantLinkForeignKey(fk, variant)) continue;\n\t\tif (variant?.singleTable === true && !fk.source.columns.every((c) => entry.ownColumns.has(c))) continue;\n\t\tthrow unsupported(`table \"${entry.namespaceId}\".\"${entry.tableName}\" has a foreign key on (${fk.source.columns.join(\", \")}) that no relation of model \"${entry.name}\" travels, which cannot be written in Prisma 8 PSL.`, \"The PSL source derives every foreign key from a `@relation` field; a foreign key without one has no PSL form.\", \"Declare a relation over the foreign key, or keep authoring this contract in its current source.\", {\n\t\t\tnamespaceId: entry.namespaceId,\n\t\t\ttable: entry.tableName,\n\t\t\tcolumns: fk.source.columns\n\t\t});\n\t}\n}\nfunction refuseRelationToOtherContractSpace(input) {\n\tif (input.space === void 0) return;\n\tthrow unsupported(`relation \"${input.modelName}.${input.fieldName}\" targets model \"${input.targetModel}\" in contract space \"${input.space}\", which contract print cannot write yet.`, \"The printer writes relations between models of this contract only.\", KEEP_SOURCE, {\n\t\tmodel: input.modelName,\n\t\tfield: input.fieldName,\n\t\tspace: input.space\n\t});\n}\nfunction refuseManyToManyWithoutJunctionRelation(modelName, fieldName) {\n\tthrow unsupported(`many-to-many relation \"${modelName}.${fieldName}\" goes through a table whose model has no relation back to \"${modelName}\", so it cannot be written in Prisma 8 PSL.`, \"PSL writes a many-to-many list field through the relations of the junction model, one to each side.\", \"Declare a model for the junction table with a relation to each side, or keep authoring this contract in its current source.\", {\n\t\tmodel: modelName,\n\t\tfield: fieldName\n\t});\n}\nfunction refuseBackRelationWithoutOwningRelation(input) {\n\tthrow unsupported(`relation \"${input.modelName}.${input.fieldName}\" has no foreign key of its own, and model \"${input.targetModel}\" has no relation back to \"${input.modelName}\" over the same columns, so it cannot be written in Prisma 8 PSL.`, \"The PSL source reads a relation field without `fields:` and `references:` only as the other side of a relation field that has them.\", `Declare the relation on \"${input.targetModel}\" that holds the foreign key, or keep authoring this contract in its current source.`, {\n\t\tmodel: input.modelName,\n\t\tfield: input.fieldName\n\t});\n}\nfunction refuseRelationWithoutJoin(modelName, fieldName) {\n\tthrow unsupported(`relation \"${modelName}.${fieldName}\" names no fields to join on, which cannot be written in Prisma 8 PSL.`, \"The PSL source reads every relation as a join between fields of the two models; a relation with no `on` part has no PSL form.\", KEEP_SOURCE, {\n\t\tmodel: modelName,\n\t\tfield: fieldName\n\t});\n}\n/**\n* Refuses a namespace whose value sets differ from the ones the PSL source derives from the enum\n* and `native_enum` blocks the printer writes for it.\n*/\nfunction refuseUnderivedValueSets(input) {\n\tconst { namespaceId } = input;\n\tfor (const [name, values] of input.actual) {\n\t\tconst derived = input.derived.get(name);\n\t\tif (derived !== void 0 && sameValues$1(derived, values)) continue;\n\t\tthrow unsupported(`value set \"${name}\" in namespace \"${namespaceId}\" is not the value set of an enum or native enum of that name holding exactly its values, so it cannot be written in Prisma 8 PSL.`, \"The PSL source derives each value set from an `enum` or `native_enum` block, named after the block and holding its members.\", KEEP_SOURCE, {\n\t\t\tnamespaceId,\n\t\t\tname\n\t\t});\n\t}\n\tfor (const name of input.derived.keys()) {\n\t\tif (input.actual.has(name)) continue;\n\t\tthrow unsupported(`enum \"${name}\" in namespace \"${namespaceId}\" has no value set holding its members, which cannot be written in Prisma 8 PSL.`, \"The PSL source derives a value set from every enum, so the file would read back with a value set this contract does not have.\", KEEP_SOURCE, {\n\t\t\tnamespaceId,\n\t\t\tname\n\t\t});\n\t}\n}\nfunction refuseEnumAndNativeEnumSharingName(namespaceId, name) {\n\tthrow unsupported(`enum \"${name}\" and a native enum written under the same name both derive the value set \"${name}\" in namespace \"${namespaceId}\", which cannot be written in Prisma 8 PSL.`, \"The PSL source refuses one name declared both as an enum and as a native enum.\", KEEP_SOURCE, {\n\t\tnamespaceId,\n\t\tname\n\t});\n}\nfunction refuseNativeEnumWithoutValueSet(namespaceId, nativeEnum) {\n\tthrow unsupported(`native enum \"${nativeEnum.typeName}\" in namespace \"${namespaceId}\" has no value set holding its members, which cannot be written in Prisma 8 PSL.`, \"The PSL source derives a value set from every `native_enum` block, named after the block and holding its members, so the file would read back with a value set this contract does not have.\", KEEP_SOURCE, {\n\t\tnamespaceId,\n\t\ttypeName: nativeEnum.typeName\n\t});\n}\nfunction refuseNativeEnumControl(namespaceId, nativeEnum) {\n\tif (nativeEnum.control === void 0) return;\n\tthrow unsupported(`native enum \"${nativeEnum.typeName}\" in namespace \"${namespaceId}\" carries its own control policy \"${nativeEnum.control}\", which cannot be written in Prisma 8 PSL.`, \"A `native_enum` block has no control attribute.\", \"Drop the policy from the enum, or keep authoring this contract in its current source.\", {\n\t\tnamespaceId,\n\t\ttypeName: nativeEnum.typeName,\n\t\tcontrol: nativeEnum.control\n\t});\n}\n/**\n* Refuses a storage or domain namespace the PSL source would not create again: one holding nothing\n* the printer writes. The PSL source creates the default namespace in both planes, a storage\n* namespace for every namespace block it writes into, and a domain namespace for each namespace\n* with models.\n*/\nfunction refuseUnwrittenNamespaces(input) {\n\tconst { contract } = input;\n\tconst storageNamespaces = /* @__PURE__ */ new Set([DEFAULT_NAMESPACE_ID, ...input.writtenStorageNamespaces]);\n\tconst defaultDomain = contract.domain.namespaces[DEFAULT_NAMESPACE_ID];\n\tconst domainNamespaces = new Set(input.models.map((entry) => entry.namespaceId));\n\tif (domainNamespaces.size === 0 || Object.keys(defaultDomain?.valueObjects ?? {}).length > 0 || Object.keys(defaultDomain?.enum ?? {}).length > 0) domainNamespaces.add(DEFAULT_NAMESPACE_ID);\n\tconst planes = [{\n\t\tplane: \"storage\",\n\t\texpected: storageNamespaces,\n\t\tactual: Object.keys(contract.storage.namespaces)\n\t}, {\n\t\tplane: \"domain\",\n\t\texpected: domainNamespaces,\n\t\tactual: Object.keys(contract.domain.namespaces)\n\t}];\n\tfor (const { plane, expected, actual } of planes) {\n\t\tfor (const namespaceId of actual) {\n\t\t\tif (expected.has(namespaceId)) continue;\n\t\t\tthrow unsupported(`${plane} namespace \"${namespaceId}\" holds nothing Prisma 8 PSL writes, so it would not read back.`, \"The PSL source creates a namespace only for what is written in it.\", \"Remove the empty namespace, or keep authoring this contract in its current source.\", {\n\t\t\t\tplane,\n\t\t\t\tnamespaceId\n\t\t\t});\n\t\t}\n\t\tfor (const namespaceId of expected) {\n\t\t\tif (actual.includes(namespaceId)) continue;\n\t\t\tthrow unsupported(`the contract has no ${plane} namespace \"${namespaceId}\", which the PSL source would create.`, \"The PSL source always creates the default namespace, and a namespace for everything it writes.\", KEEP_SOURCE, {\n\t\t\t\tplane,\n\t\t\t\tnamespaceId\n\t\t\t});\n\t\t}\n\t}\n}\n/**\n* Refuses a namespace named `unbound` that is not the late-binding namespace: PSL writes the\n* late-binding namespace as `namespace unbound`, so a block of that name reads back as it.\n*/\nfunction refuseNamespaceNamedUnbound(namespaceId) {\n\tif (namespaceId !== UNBOUND_PSL_NAMESPACE_NAME) return;\n\tthrow unsupported(`namespace \"${namespaceId}\" cannot be written in Prisma 8 PSL, because \\`namespace ${UNBOUND_PSL_NAMESPACE_NAME}\\` is how PSL writes the late-binding namespace.`, `The PSL source reads \\`namespace ${UNBOUND_PSL_NAMESPACE_NAME}\\` as the late-binding namespace \"${UNBOUND_NAMESPACE_ID}\", so everything in this namespace would move there.`, \"Rename the namespace, or keep authoring this contract in its current source.\", { namespaceId });\n}\n/** Refuses top-level `meta` entries: the PSL source reads back an empty `meta`. */\nfunction refuseContractMeta(contract) {\n\tconst keys = Object.keys(contract.meta);\n\tif (keys.length === 0) return;\n\tthrow unsupported(`the contract carries meta entries (${keys.join(\", \")}), which cannot be written in Prisma 8 PSL.`, \"The PSL source writes no top-level meta, so the file would read back with an empty meta.\", KEEP_SOURCE, { keys });\n}\n/**\n* Refuses roots that differ from the ones the PSL source derives: one per model that is not a\n* variant, keyed by its table name, or by `<namespace>.<table>` when two such models share a table\n* name.\n*/\nfunction refuseUnderivedRoots(contract, models, variants) {\n\tconst tableEntries = models.filter((entry) => variants.get(entry)?.singleTable !== true);\n\tconst tableNameCounts = /* @__PURE__ */ new Map();\n\tfor (const entry of tableEntries) tableNameCounts.set(entry.tableName, (tableNameCounts.get(entry.tableName) ?? 0) + 1);\n\tconst derived = /* @__PURE__ */ new Map();\n\tfor (const entry of tableEntries) {\n\t\tif (variants.get(entry) !== void 0) continue;\n\t\tconst key = (tableNameCounts.get(entry.tableName) ?? 0) > 1 ? `${entry.namespaceId}.${entry.tableName}` : entry.tableName;\n\t\tderived.set(key, entry);\n\t}\n\tconst refuse = (root) => unsupported(`root \"${root}\" is not a root the PSL source derives, so the contract's roots cannot be written in Prisma 8 PSL.`, \"The PSL source derives one root per model that is not a variant, keyed by its table name.\", KEEP_SOURCE, { root });\n\tfor (const [root, reference] of Object.entries(contract.roots)) {\n\t\tconst entry = derived.get(root);\n\t\tif (entry === void 0 || reference.space !== void 0 || reference.namespace !== entry.namespaceId || reference.model !== entry.name) throw refuse(root);\n\t}\n\tfor (const root of derived.keys()) if (!Object.hasOwn(contract.roots, root)) throw refuse(root);\n}\nfunction refuseRlsWithoutModel(namespaceId, tableName) {\n\tthrow unsupported(`table \"${namespaceId}\".\"${tableName}\" has row-level security enabled but no model, so it cannot be written in Prisma 8 PSL.`, \"Row-level security is written as `@@rls` on the model stored in the table.\", \"Declare a model for the table, or keep authoring this contract in its current source.\", {\n\t\tnamespaceId,\n\t\ttable: tableName\n\t});\n}\nfunction unwritablePolicy(policy, why, fix) {\n\treturn unsupported(`policy \"${policy.name}\" on \"${policy.namespaceId}\".\"${policy.tableName}\" cannot be written in Prisma 8 PSL.`, why, fix, {\n\t\tnamespaceId: policy.namespaceId,\n\t\ttable: policy.tableName,\n\t\tname: policy.name\n\t});\n}\nfunction refusePolicyWithoutModel(policy) {\n\tthrow unwritablePolicy(policy, \"A policy block names its table through the model stored there, and no model is stored in this table.\", \"Declare a model for the table, or keep authoring this contract in its current source.\");\n}\nfunction refusePolicyWithoutRls(policy) {\n\tthrow unwritablePolicy(policy, \"The PSL source reads a policy only on a model that declares `@@rls`, and this table does not have row-level security enabled.\", \"Enable row-level security on the table, or keep authoring this contract in its current source.\");\n}\nfunction refusePolicyNameNotDerived(policy) {\n\tthrow unwritablePolicy(policy, \"The PSL source names a wire-named policy by its block name and the hash of its content, and this name is not that.\", KEEP_SOURCE);\n}\n/** Refuses a role outside the unbound namespace: the PSL source reads a `role` block only there. */\nfunction refuseRoleOutsideUnbound(namespaceId, name) {\n\tif (namespaceId === UNBOUND_NAMESPACE_ID) return;\n\tthrow unsupported(`role \"${name}\" is declared in namespace \"${namespaceId}\", and Prisma 8 PSL declares a role only in the unbound namespace.`, \"The PSL source reads a `role` block only inside `namespace unbound`, because roles belong to the whole database.\", \"Declare the role in the unbound namespace, or keep authoring this contract in its current source.\", {\n\t\tnamespaceId,\n\t\tname\n\t});\n}\nconst FILED_UNDER = {\n\trls: \"The PSL source files the row-level security setting written as `@@rls` under the name of the table.\",\n\trole: \"The PSL source files a role under the name its block is written with.\"\n};\n/** Refuses a row-level security setting or role filed under a key the PSL source would not use. */\nfunction refuseEntryFiledUnderAnotherName(input) {\n\tif (input.name === input.readsBackAs) return;\n\tthrow unsupported(`namespace \"${input.namespaceId}\" has a \"${input.kind}\" entry \"${input.name}\" that would read back as \"${input.readsBackAs}\", so it cannot be written in Prisma 8 PSL.`, FILED_UNDER[input.kind], KEEP_SOURCE, {\n\t\tnamespaceId: input.namespaceId,\n\t\tkind: input.kind,\n\t\tname: input.name\n\t});\n}\n/** Refuses an entry that records a namespace other than the one it is stored in. */\nfunction refuseEntryInOtherNamespace(input) {\n\tif (input.recordedNamespaceId === input.namespaceId) return;\n\tthrow unsupported(`the \"${input.kind}\" entry \"${input.name}\" is stored in namespace \"${input.namespaceId}\" but records namespace \"${input.recordedNamespaceId}\", so it cannot be written in Prisma 8 PSL.`, \"The PSL source records the namespace a block is written in, so the entry would read back with the namespace it is stored in.\", \"The contract source produced an entry that disagrees with its namespace. Fix the entry if the source is a TypeScript contract; otherwise report the bug to the source that produced it.\", {\n\t\tnamespaceId: input.namespaceId,\n\t\tkind: input.kind,\n\t\tname: input.name\n\t});\n}\nfunction refuseNameThePslSourceLoses(kind, name) {\n\tif (name !== NAME_THE_PSL_SOURCE_LOSES) return;\n\tthrow unsupported(`${kind} \"${name}\" cannot be written in Prisma 8 PSL, because the PSL source loses this name when it reads it.`, \"The PSL source keeps names as keys of plain objects, where this name sets the prototype instead of adding a key.\", \"Rename it, or keep authoring this contract in its current source.\", {\n\t\tkind,\n\t\tname\n\t});\n}\n/**\n* Refuses a table or column named `__proto__`, which the printer would write inside `@@map` or\n* `@map` and the PSL source loses when it reads it.\n*/\nfunction refuseUnwritableMappedName(kind, name) {\n\trefuseNameThePslSourceLoses(kind, name);\n}\n/**\n* Refuses a name the printer writes where PSL reads an identifier: a namespace, model, field, value\n* object, enum, enum member, native enum, named type, policy, role or index option key.\n*/\nfunction refuseUnwritableName(kind, name) {\n\trefuseNameThePslSourceLoses(kind, name);\n\tif (isPslIdentifier(name)) return;\n\tthrow unsupported(`${kind} \"${name}\" is not a PSL identifier, so it cannot be written in Prisma 8 PSL.`, \"PSL writes this name as an identifier: a letter or underscore, then letters, ASCII digits, underscores or hyphens, other than the number words `NaN` and `Infinity`.\", \"Rename it to an identifier, or keep authoring this contract in its current source.\", {\n\t\tkind,\n\t\tname\n\t});\n}\n/** The storage entry kinds the printer writes; any other kind is refused, whichever component defines it. */\nconst PRINTED_ENTRY_KINDS = /* @__PURE__ */ new Set([\n\t\"table\",\n\t\"valueSet\",\n\t\"native_enum\",\n\t\"rls\",\n\t\"policy\",\n\t\"role\"\n]);\nfunction refuseUnprintedEntryKinds(namespaceId, entries) {\n\tfor (const [kind, entities] of Object.entries(entries)) {\n\t\tif (PRINTED_ENTRY_KINDS.has(kind)) continue;\n\t\tconst names = Object.keys(entities ?? {});\n\t\tif (names.length === 0) continue;\n\t\tthrow unsupported(`namespace \"${namespaceId}\" declares ${names.length} \"${kind}\" ${names.length === 1 ? \"entity\" : \"entities\"} (${names.join(\", \")}), which the Postgres printer cannot write.`, \"The printer writes tables, value sets, native enums, row-level security settings, policies and roles, and no other entity kind.\", KEEP_SOURCE, {\n\t\t\tnamespaceId,\n\t\t\tkind,\n\t\t\tnames\n\t\t});\n\t}\n}\n//#endregion\n//#region src/core/psl-print/column-types.ts\n/**\n* The type arguments a native type takes, in the order the PSL type\n* constructor declares them.\n*/\nconst TYPE_PARAM_ORDER = [\n\t\"length\",\n\t\"precision\",\n\t\"scale\"\n];\n/** The name of the column's data type without parameters, as the type map knows it. */\nfunction baseTypeName(column, dataTypeLookup, coordinate) {\n\tconst dataType = dataTypeLookup.get(column.dataType);\n\tif (dataType === void 0 || !isSqlDataType(dataType)) return refuseColumnWithoutPslType(column, coordinate);\n\treturn unquotedSqlBaseName(dataType, dataTypeParams(dataType, column.typeParams));\n}\n/**\n* Re-composes the parenthesised native type the type map resolves\n* (`numeric(10,2)`) from a column's base type name and its type parameters.\n*/\nfunction typeMapText(column, baseName) {\n\tconst args = TYPE_PARAM_ORDER.map((key) => column.typeParams?.[key]).filter((value) => typeof value === \"number\");\n\treturn args.length === 0 ? baseName : `${baseName}(${args.join(\", \")})`;\n}\n/** A type argument as PSL writes it: a number as written, a string between quotes. */\nfunction typeArgumentText(value, coordinate) {\n\tif (typeof value !== \"string\") return String(value);\n\trefuseUnwritableTypeArgument(value, coordinate);\n\treturn `\"${value}\"`;\n}\nfunction typeCall(path, args) {\n\tconst name = path.join(\".\");\n\tconst isNamespaced = path.length > 1;\n\tif (args.length === 0 && !isNamespaced) return { typeName: name };\n\treturn {\n\t\ttypeName: name,\n\t\ttypeConstructor: {\n\t\t\tkind: \"typeConstructor\",\n\t\t\tpath,\n\t\t\targs: args.map(positionalArg),\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t}\n\t};\n}\n/**\n* The call to the type constructor the type map `contract infer` uses names for the column's native\n* type, when the stack's constructor of that name produces exactly the column's codec, native type\n* and type parameters.\n*/\nfunction typeMapCall(column, baseName, typeMap, authoringTypes) {\n\tconst resolution = typeMap.resolve(typeMapText(column, baseName));\n\tif (\"unsupported\" in resolution) return void 0;\n\tconst { name } = resolution.pslType;\n\tconst descriptor = authoringTypes[name];\n\treturn descriptor === void 0 ? void 0 : findAuthoringTypeConstructorCall({ [name]: descriptor }, column);\n}\n/**\n* The PSL type position for a storage column: a call to a type constructor the configured stack\n* contributes that produces exactly the column's codec, native type and type parameters. The\n* constructor the type map `contract infer` uses names for the native type comes first; otherwise\n* the first one in the stack that produces them, such as `DateTime` for a `timestamptz` column read\n* as a `Temporal.Instant`, or `pgvector.Vector(3)`. An enum-typed column takes the\n* `pg.enum(<Block>)` constructor, named after the value set the column points at; a column typed by\n* a domain enum takes that enum's name. A column no PSL type reads back is refused.\n*/\nfunction buildColumnType(input) {\n\tconst { column, typeMap, authoringTypes, enumBlockNames, coordinate } = input;\n\tconst baseName = baseTypeName(column, input.dataTypeLookup, coordinate);\n\tconst enumBlockName = column.valueSet?.entityName ?? enumBlockNames.get(baseName);\n\tif (column.codecId === \"pg/enum@1\" && enumBlockName !== void 0) return {\n\t\ttypeName: enumBlockName,\n\t\ttypeConstructor: {\n\t\t\tkind: \"typeConstructor\",\n\t\t\tpath: [\"pg\", \"enum\"],\n\t\t\targs: [positionalArg(enumBlockName)],\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t}\n\t};\n\tconst domainEnumName = column.valueSet?.entityName;\n\tif (domainEnumName !== void 0) return { typeName: domainEnumName };\n\tconst call = typeMapCall(column, baseName, typeMap, authoringTypes) ?? findAuthoringTypeConstructorCall(authoringTypes, column);\n\tif (call !== void 0) return typeCall(call.path, call.args.map((value) => typeArgumentText(value, coordinate)));\n\trefuseColumnWithoutPslType(column, coordinate);\n}\n//#endregion\n//#region src/core/psl-print/domain-types.ts\n/**\n* The data type a value-object member's codec represents, after checking the member's type\n* parameters against it. A member has no column of its own.\n*/\nfunction dataTypeOfMember(type, coordinate, context) {\n\tconst { codecId } = type;\n\tconst descriptor = context.codecLookup.descriptorFor(codecId);\n\tif (descriptor === void 0) refuseMemberCodecWithoutNativeType(codecId, coordinate);\n\tconst dataType = context.dataTypes.lookup.get(descriptor.dataType);\n\tif (dataType === void 0 || !isSqlDataType(dataType)) refuseMemberCodecWithoutNativeType(codecId, coordinate);\n\tconst typeParams = resolvedTypeParams(type, void 0);\n\tif (typeParams === void 0) {\n\t\tif (requiredParamKeys(dataType).length > 0) refuseMemberCodecNeedingTypeParameters(codecId, coordinate);\n\t\treturn dataType.id;\n\t}\n\tvalidateCodecTypeParams(descriptor, {\n\t\tcodecId,\n\t\ttypeParams: blindCast(typeParams)\n\t});\n\treturn dataType.id;\n}\n/** The PSL type position of a value-object member: a value object or an enum by name, or a scalar as a column would print. */\nfunction buildMemberType(input) {\n\tconst { field, coordinate } = input;\n\trefuseUnwritableFieldShape(field, coordinate);\n\tconst { type } = field;\n\tif (type.kind === \"valueObject\") return { typeName: type.name };\n\trefuseUnderivedMemberValueSet({\n\t\tfield,\n\t\ttype,\n\t\tcoordinate,\n\t\tdomainEnums: input.domainEnums\n\t});\n\tif (field.valueSet !== void 0) return { typeName: field.valueSet.entityName };\n\treturn buildColumnType({\n\t\tcolumn: new StorageColumn({\n\t\t\tdataType: dataTypeOfMember(type, coordinate, input.context),\n\t\t\tcodecId: type.codecId,\n\t\t\tnullable: field.nullable,\n\t\t\t...ifDefined(\"many\", field.many),\n\t\t\t...ifDefined(\"typeParams\", type.typeParams)\n\t\t}),\n\t\ttypeMap: input.typeMap,\n\t\tauthoringTypes: input.context.authoringContributions.type,\n\t\tdataTypeLookup: input.context.dataTypes.lookup,\n\t\tenumBlockNames: input.enumBlockNames,\n\t\tcoordinate\n\t});\n}\n/** The `type` blocks of one namespace, one per value object the domain declares there. */\nfunction buildCompositeTypes(input) {\n\trefuseValueObjectsOutsideDefaultNamespace(input.contract, input.namespaceId);\n\tconst valueObjects = input.contract.domain.namespaces[input.namespaceId]?.valueObjects ?? {};\n\treturn Object.entries(valueObjects).map(([name, valueObject]) => {\n\t\trefuseUnwritableName(\"value object\", name);\n\t\treturn {\n\t\t\tkind: \"compositeType\",\n\t\t\tname,\n\t\t\tfields: Object.entries(valueObject.fields).map(([fieldName, field]) => {\n\t\t\t\trefuseUnwritableName(\"field\", fieldName);\n\t\t\t\tconst { typeName, typeConstructor } = buildMemberType({\n\t\t\t\t\tfield,\n\t\t\t\t\tcoordinate: `\"${input.namespaceId}\".${name}.${fieldName}`,\n\t\t\t\t\ttypeMap: input.typeMap,\n\t\t\t\t\tcontext: input.context,\n\t\t\t\t\tenumBlockNames: input.enumBlockNames,\n\t\t\t\t\tdomainEnums: input.domainEnums\n\t\t\t\t});\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"field\",\n\t\t\t\t\tname: fieldName,\n\t\t\t\t\ttypeName,\n\t\t\t\t\t...ifDefined(\"typeConstructor\", typeConstructor),\n\t\t\t\t\toptional: field.nullable,\n\t\t\t\t\tlist: !!field.many,\n\t\t\t\t\telementOptional: !!field.many && field.many.elementNullable,\n\t\t\t\t\tattributes: [],\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t};\n\t\t\t}),\n\t\t\tattributes: [],\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t};\n\t});\n}\n/** The document's `types { … }` block, one declaration per named storage type. */\nfunction buildTypesBlock(contract, typeMap, context) {\n\tconst declarations = [];\n\tfor (const [name, instance] of Object.entries(contract.storage.types ?? {})) {\n\t\trefuseUnwritableName(\"named type\", name);\n\t\tconst { typeName, typeConstructor } = buildColumnType({\n\t\t\tcolumn: new StorageColumn({\n\t\t\t\tdataType: instance.dataType,\n\t\t\t\tcodecId: instance.codecId,\n\t\t\t\tnullable: false,\n\t\t\t\t...ifDefined(\"typeParams\", instance.typeParams)\n\t\t\t}),\n\t\t\ttypeMap,\n\t\t\tauthoringTypes: context.authoringContributions.type,\n\t\t\tdataTypeLookup: context.dataTypes.lookup,\n\t\t\tenumBlockNames: /* @__PURE__ */ new Map(),\n\t\t\tcoordinate: `types.${name}`\n\t\t});\n\t\tdeclarations.push({\n\t\t\tkind: \"namedType\",\n\t\t\tname,\n\t\t\t...typeConstructor === void 0 ? { baseType: typeName } : { typeConstructor },\n\t\t\tattributes: [],\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t});\n\t}\n\treturn declarations.length === 0 ? void 0 : {\n\t\tkind: \"types\",\n\t\tdeclarations,\n\t\tspan: SYNTHETIC_SPAN\n\t};\n}\n//#endregion\n//#region src/core/psl-print/enum-blocks.ts\n/**\n* One `enum <name> { … }` block per domain enum, each member written as\n* `Name = <value>` under `@@type`. The PSL source reads a member value as JSON,\n* so the value is written as JSON text.\n*/\nfunction buildDomainEnumBlocks(enums) {\n\treturn Object.entries(enums).map(([name, domainEnum]) => {\n\t\trefuseUnwritableName(\"enum\", name);\n\t\treturn {\n\t\t\tkind: \"enum\",\n\t\t\tkeyword: \"enum\",\n\t\t\tname,\n\t\t\tparameters: Object.fromEntries(domainEnum.members.map((member) => {\n\t\t\t\trefuseUnwritableName(\"enum member\", member.name);\n\t\t\t\treturn [member.name, {\n\t\t\t\t\texpression: JSON.stringify(member.value),\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t}];\n\t\t\t})),\n\t\t\tblockAttributes: [{\n\t\t\t\tname: \"type\",\n\t\t\t\targs: [{\n\t\t\t\t\tkind: \"positional\",\n\t\t\t\t\tvalue: `\"${escapePslString(domainEnum.codecId)}\"`,\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t}],\n\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t}],\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t};\n\t});\n}\nfunction sameValues(left, right) {\n\treturn left.length === right.length && left.every((value, index) => value === right[index]);\n}\n/**\n* Builds one `native_enum` block per enum type a namespace declares.\n*\n* A contract keys a native enum by its type name and keys the value set it\n* derives by the name the schema gave the enum, and the PSL source derives\n* that value set from the block, named after the block. So the block is named\n* after the enum's value set: the value set a column typed by the enum names;\n* else, for an enum no column refers to, the unclaimed value set with the\n* enum's own name that holds exactly its members, or else the first unclaimed\n* one that does. An enum with no such value set is refused. `@@map` carries\n* the type name whenever it differs from the block name.\n*/\nfunction buildNativeEnumBlocksForNamespace(input) {\n\tconst valueSetNamesByTypeName = /* @__PURE__ */ new Map();\n\tfor (const column of input.columns) {\n\t\tconst valueSetName = column.valueSet?.entityName;\n\t\tconst typeName = column.typeParams?.[\"typeName\"];\n\t\tif (valueSetName === void 0 || typeof typeName !== \"string\") continue;\n\t\tvalueSetNamesByTypeName.set(typeName, valueSetName);\n\t}\n\tconst claimed = new Set(valueSetNamesByTypeName.values());\n\tconst unreferenced = [];\n\tconst nameByEntry = /* @__PURE__ */ new Map();\n\tfor (const [entryName, nativeEnum] of input.nativeEnums) {\n\t\trefuseNativeEnumControl(input.namespaceId, nativeEnum);\n\t\tconst { typeName } = nativeEnum;\n\t\tconst fromColumn = valueSetNamesByTypeName.get(typeName) ?? valueSetNamesByTypeName.get(`${input.namespaceId}.${typeName}`);\n\t\tif (fromColumn === void 0) {\n\t\t\tunreferenced.push({\n\t\t\t\tentryName,\n\t\t\t\tnativeEnum\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tnameByEntry.set(entryName, fromColumn);\n\t}\n\tfor (const { entryName, nativeEnum } of unreferenced) {\n\t\tconst candidates = [...input.valueSets].filter(([name, values]) => !claimed.has(name) && sameValues(values, nativeEnum.members)).map(([name]) => name);\n\t\tconst chosen = candidates.find((name) => name === entryName) ?? candidates[0];\n\t\tif (chosen === void 0) refuseNativeEnumWithoutValueSet(input.namespaceId, nativeEnum);\n\t\tclaimed.add(chosen);\n\t\tnameByEntry.set(entryName, chosen);\n\t}\n\tconst blocks = [];\n\tconst blockNamesByTypeName = /* @__PURE__ */ new Map();\n\tconst derivedValueSets = /* @__PURE__ */ new Map();\n\tfor (const [entryName, nativeEnum] of input.nativeEnums) {\n\t\tconst { typeName } = nativeEnum;\n\t\tconst blockName = nameByEntry.get(entryName) ?? typeName;\n\t\trefuseUnwritableName(\"native enum\", blockName);\n\t\tblocks.push(buildNativeEnumBlock(blockName, typeName, nativeEnum.members));\n\t\tblockNamesByTypeName.set(typeName, blockName);\n\t\tblockNamesByTypeName.set(`${input.namespaceId}.${typeName}`, blockName);\n\t\tderivedValueSets.set(blockName, nativeEnum.members);\n\t}\n\treturn {\n\t\tblocks,\n\t\tblockNamesByTypeName,\n\t\tderivedValueSets\n\t};\n}\n//#endregion\n//#region src/core/psl-print/model-attributes.ts\n/**\n* The checks the PSL source derives itself for a table, keyed by name, so\n* they are not also written as `@@check`. A table that is not managed derives\n* none. A managed one derives a membership check for each column typed by a\n* domain enum and an element-not-null check for each list column, less the\n* kinds a column waives with `@noCheck`.\n*/\nfunction derivedChecks(input) {\n\tconst checks = /* @__PURE__ */ new Map();\n\tif (!input.managed) return checks;\n\tfor (const [columnName, column] of Object.entries(input.table.columns)) {\n\t\tconst enumValues = column.codecId === \"pg/enum@1\" || column.valueSet === void 0 ? void 0 : input.domainEnumValues.get(column.valueSet.entityName);\n\t\tconst memberValues = enumValues?.filter((value) => typeof value === \"string\" || typeof value === \"number\");\n\t\tconst waived = new Set(column.noCheck ?? []);\n\t\tfor (const candidate of postgresRenderCheckExpressions({\n\t\t\ttableName: input.tableName,\n\t\t\tcolumnName,\n\t\t\tmany: column.many,\n\t\t\tmemberValues: memberValues?.length === enumValues?.length ? memberValues : void 0\n\t\t})) {\n\t\t\tif (waived.has(candidate.kind)) continue;\n\t\t\tconst prefix = composeCheckWirePrefix(input.tableName, columnName, candidate.kind);\n\t\t\tchecks.set(formatWireName(prefix, computeCheckContentHash(candidate.expression)), {\n\t\t\t\tprefix,\n\t\t\t\texpression: candidate.expression\n\t\t\t});\n\t\t}\n\t}\n\treturn checks;\n}\n/**\n* Whether a table object belongs to this model when several models share the\n* table: a single-table variant owns what lies within its own columns, and the\n* base owns the rest.\n*/\nfunction ownsTableObject(entry, variant, singleTableVariants, columns) {\n\tif (variant?.singleTable === true) return columns?.every((column) => entry.ownColumns.has(column)) === true;\n\treturn !singleTableVariants.some((other) => columns?.every((column) => other.ownColumns.has(column)) === true);\n}\n/**\n* How a check or index is named in PSL: `name:` with its prefix when the name\n* is that prefix and the hash of its content, which the PSL source derives\n* again; `map:` when it has no prefix. A prefix whose name is anything else is\n* refused, because neither form reads back as it.\n*/\nfunction attributeNaming(input) {\n\tconst { kind, entry, name, prefix } = input;\n\tif (prefix === void 0) return { kind: \"exact\" };\n\tif (formatWireName(prefix, input.contentHash()) === name) return {\n\t\tkind: \"wire\",\n\t\tprefix\n\t};\n\trefuseUnwritableObjectName({\n\t\tkind,\n\t\tentry,\n\t\tname,\n\t\tprefix\n\t});\n}\n/**\n* The `@@` attributes of one model: its polymorphism, its keys, checks and indexes, its control\n* policy, `@@rls` and `@@map`. A table object several models share goes on the model that owns it.\n*/\nfunction buildModelAttributes(input) {\n\tconst { entry, variant, singleTableVariants, derivedChecksByName } = input;\n\tconst attributes = [];\n\tconst fieldNameOf = (column) => entry.fieldNamesByColumn.get(column) ?? column;\n\tconst owns = (columns) => ownsTableObject(entry, variant, singleTableVariants, columns);\n\tif (entry.model.discriminator !== void 0) attributes.push(buildAttribute(\"model\", \"discriminator\", [positionalArg(entry.model.discriminator.field)]));\n\tif (variant !== void 0) attributes.push(buildAttribute(\"model\", \"base\", [positionalArg(variant.base.name), positionalArg(`\"${escapePslString(variant.value)}\"`)]));\n\tconst primaryKeyColumns = variant === void 0 ? entry.table.primaryKey?.columns ?? [] : [];\n\tif (primaryKeyColumns.length > 1) attributes.push(buildModelConstraintAttribute(\"id\", primaryKeyColumns.map(fieldNameOf), entry.table.primaryKey?.name));\n\tfor (const unique of entry.table.uniques) {\n\t\tif (!owns(unique.columns)) continue;\n\t\tattributes.push(buildModelConstraintAttribute(\"unique\", unique.columns.map(fieldNameOf), unique.name));\n\t}\n\tfor (const check of entry.table.checks ?? []) {\n\t\tif (derivedChecksByName.has(check.name) || !owns(void 0)) continue;\n\t\trefuseSqlTextThatDoesNotReadBack({\n\t\t\tkind: \"check\",\n\t\t\tnamespaceId: entry.namespaceId,\n\t\t\ttable: entry.tableName,\n\t\t\tname: check.name,\n\t\t\ttexts: [check.expression]\n\t\t});\n\t\tattributes.push(buildCheckAttribute(check, attributeNaming({\n\t\t\tkind: \"check\",\n\t\t\tentry,\n\t\t\tname: check.name,\n\t\t\tprefix: check.prefix,\n\t\t\tcontentHash: () => computeCheckContentHash(check.expression)\n\t\t})));\n\t}\n\tfor (const index of entry.table.indexes) {\n\t\tif (!owns(index.columns)) continue;\n\t\tconst naming = attributeNaming({\n\t\t\tkind: \"index\",\n\t\t\tentry,\n\t\t\tname: index.name,\n\t\t\tprefix: index.prefix,\n\t\t\tcontentHash: () => computeIndexContentHash(index)\n\t\t});\n\t\trefuseSqlTextThatDoesNotReadBack({\n\t\t\tkind: \"index\",\n\t\t\tnamespaceId: entry.namespaceId,\n\t\t\ttable: entry.tableName,\n\t\t\tname: index.name,\n\t\t\ttexts: [index.expression, index.where]\n\t\t});\n\t\tconst fullText = fullTextIndexDefinitionOf(index);\n\t\tif (fullText !== void 0) {\n\t\t\tattributes.push(buildFullTextIndexAttribute(index, fullText, fieldNameOf, naming));\n\t\t\tcontinue;\n\t\t}\n\t\trefuseUnwritableIndexOptions(entry, index);\n\t\tattributes.push(buildIndexAttribute(index, index.columns?.map(fieldNameOf), naming));\n\t}\n\tif (entry.table.control !== void 0 && variant?.singleTable !== true) attributes.push(buildAttribute(\"model\", \"control\", [positionalArg(entry.table.control)]));\n\tif (input.rlsEnabled && variant?.singleTable !== true) attributes.push(buildAttribute(\"model\", \"rls\", []));\n\tconst mapName = pslModelMapName(entry.name, entry.tableName);\n\tif (mapName !== void 0 && variant?.singleTable !== true) attributes.push(buildMapAttribute(\"model\", mapName));\n\treturn attributes;\n}\n//#endregion\n//#region src/core/psl-print/relation-fields.ts\nconst PSL_REFERENTIAL_ACTIONS = {\n\tnoAction: \"NoAction\",\n\trestrict: \"Restrict\",\n\tcascade: \"Cascade\",\n\tsetNull: \"SetNull\",\n\tsetDefault: \"SetDefault\"\n};\nfunction isReferenceRelation(relation) {\n\treturn \"on\" in relation && relation.on !== void 0;\n}\nfunction collectRelations(models) {\n\tconst entries = [];\n\tfor (const owner of models) for (const [fieldName, relation] of Object.entries(owner.model.relations)) {\n\t\tif (!isReferenceRelation(relation)) refuseRelationWithoutJoin(owner.name, fieldName);\n\t\tentries.push({\n\t\t\towner,\n\t\t\tfieldName,\n\t\t\trelation,\n\t\t\ttargetCoordinate: crossReferenceCoordinate(relation.to)\n\t\t});\n\t}\n\treturn entries;\n}\n/** A relation whose local fields carry the foreign key — the side `@relation(fields:…)` goes on. */\nfunction isOwningRelation(entry) {\n\treturn entry.relation.cardinality === \"N:1\";\n}\nfunction relationKey(entry) {\n\treturn JSON.stringify([\n\t\tentry.owner.namespaceId,\n\t\tentry.owner.name,\n\t\tentry.fieldName\n\t]);\n}\n/** The relation name a pair is pinned with when the model pair carries more than one relation. */\nfunction relationName(entry) {\n\treturn `${entry.owner.name}_${entry.fieldName}`;\n}\nfunction columnsIn(model, fieldNames) {\n\treturn fieldNames.map((fieldName) => model.storage.fields[fieldName]?.column ?? fieldName);\n}\nfunction columnsOf(entry, fieldNames) {\n\treturn columnsIn(entry.owner, fieldNames);\n}\nfunction sameColumns(a, b) {\n\treturn a.length === b.length && a.every((value, index) => value === b[index]);\n}\n/** The foreign key that backs an owning relation. */\nfunction foreignKeyFor(entry, target) {\n\tconst localColumns = columnsOf(entry, entry.relation.on.localFields);\n\tconst targetColumns = columnsIn(target, entry.relation.on.targetFields);\n\treturn entry.owner.table.foreignKeys.find((fk) => fk.target.spaceId === void 0 && fk.target.tableName === target.tableName && fk.target.namespaceId === target.namespaceId && sameColumns(fk.source.columns, localColumns) && sameColumns(fk.target.columns, targetColumns));\n}\n/**\n* The owning relation on `target` that pairs with a back-relation `entry`: the\n* one pointing back at `entry`'s model over the same columns. The\n* back-relation's target fields name fields of the target model, so they are\n* resolved to columns through the candidate's own model, not through the\n* back-relation's.\n*/\nfunction owningPartner(entry, relationsByModel) {\n\tconst ownerCoordinate = modelCoordinate(entry.owner.namespaceId, entry.owner.name);\n\treturn relationsByModel.get(entry.targetCoordinate)?.find((candidate) => isOwningRelation(candidate) && candidate.targetCoordinate === ownerCoordinate && sameColumns(columnsOf(candidate, candidate.relation.on.localFields), columnsIn(candidate.owner, entry.relation.on.targetFields)));\n}\n/**\n* The junction-side relation that points back at the parent of a many-to-many\n* relation — the one whose columns are the junction's parent columns.\n*/\nfunction junctionParentRelation(entry, relationsByModel) {\n\tconst through = entry.relation.through;\n\tif (through === void 0) return void 0;\n\tconst ownerCoordinate = modelCoordinate(entry.owner.namespaceId, entry.owner.name);\n\tfor (const [, relations] of relationsByModel) for (const candidate of relations) {\n\t\tif (candidate.owner.tableName !== through.table || candidate.owner.namespaceId !== through.namespaceId || candidate.targetCoordinate !== ownerCoordinate || !isOwningRelation(candidate)) continue;\n\t\tif (sameColumns(columnsOf(candidate, candidate.relation.on.localFields), through.parentColumns)) return candidate;\n\t}\n}\n/**\n* The `index` argument of an owning relation. Every index the contract carries is written as its own `@@index`, and `contract emit` derives a backing index for a relation and drops it again beside an identical index or a key on its columns. So the argument is `false` for a foreign key nothing backs, the written name of an index the derived one would not match, and absent otherwise.\n*/\nfunction relationIndexArgument(entry, foreignKey) {\n\tconst { owner } = entry;\n\tconst backing = foreignKey.index;\n\tif (backing === void 0) return \"false\";\n\tconst { table } = owner;\n\tconst columns = foreignKey.source.columns;\n\tconst derived = defaultForeignKeyIndex(owner.tableName, columns, {\n\t\tindexes: table.indexes.map(indexInputOf),\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey\n\t});\n\tif (derived !== void 0 && JSON.stringify(derived) === JSON.stringify(backing)) return;\n\tconst name = backingObjectName(table, backing);\n\tif (name === void 0) refuseUnnamedForeignKeyBacking(owner.name, entry.fieldName);\n\treturn `\"${escapePslString(name)}\"`;\n}\nfunction indexInputOf(index) {\n\tconst shape = {\n\t\tnaming: parseNaming(index.name, index.prefix),\n\t\twhere: index.where,\n\t\tunique: index.unique,\n\t\ttype: index.type,\n\t\toptions: index.options\n\t};\n\treturn index.expression !== void 0 ? {\n\t\t...shape,\n\t\texpression: index.expression\n\t} : {\n\t\t...shape,\n\t\tcolumns: index.columns ?? []\n\t};\n}\n/** The name the printed source gives what backs a foreign key: the written name of an index, unless another index shares it, or the name of the primary key or of the unique constraint with the stored columns. */\nfunction backingObjectName(table, backing) {\n\tif (\"name\" in backing) {\n\t\tconst index = table.indexes.find((candidate) => candidate.name === backing.name);\n\t\tif (index === void 0) return backing.name;\n\t\tconst written = index.prefix ?? index.name;\n\t\treturn table.indexes.some((other) => other !== index && (other.prefix ?? other.name) === written) ? index.name : written;\n\t}\n\tif (\"primaryKey\" in backing) return table.primaryKey?.name;\n\treturn table.uniques.find((unique) => sameColumns(unique.columns, backing.unique))?.name;\n}\n/** The PSL field one relation is written as. */\nfunction buildRelationField(input) {\n\tconst { entry, target, name } = input;\n\tconst { relation } = entry;\n\tconst typeNamespaceId = target.namespaceId === entry.owner.namespaceId ? void 0 : pslNamespaceName(target.namespaceId);\n\tconst args = [];\n\tif (name !== void 0) args.push(namedArg(\"name\", `\"${escapePslString(name)}\"`));\n\tif (relation.cardinality === \"N:1\" && input.ownerIsSingleTableVariant) {\n\t\targs.push(namedArg(\"fields\", `[${relation.on.localFields.join(\", \")}]`));\n\t\targs.push(namedArg(\"references\", `[${relation.on.targetFields.join(\", \")}]`));\n\t} else if (relation.cardinality === \"N:1\") {\n\t\tconst foreignKey = foreignKeyFor(entry, target);\n\t\tif (foreignKey === void 0) refuseToOneRelationWithoutForeignKey(entry.owner.name, entry.fieldName);\n\t\targs.push(namedArg(\"fields\", `[${relation.on.localFields.join(\", \")}]`));\n\t\targs.push(namedArg(\"references\", `[${relation.on.targetFields.join(\", \")}]`));\n\t\tif (foreignKey.onDelete !== void 0) args.push(namedArg(\"onDelete\", PSL_REFERENTIAL_ACTIONS[foreignKey.onDelete]));\n\t\tif (foreignKey.onUpdate !== void 0) args.push(namedArg(\"onUpdate\", PSL_REFERENTIAL_ACTIONS[foreignKey.onUpdate]));\n\t\tif (foreignKey.name !== void 0) args.push(namedArg(\"map\", `\"${escapePslString(foreignKey.name)}\"`));\n\t\tconst indexArgument = relationIndexArgument(entry, foreignKey);\n\t\tif (indexArgument !== void 0) args.push(namedArg(\"index\", indexArgument));\n\t}\n\tconst list = relation.cardinality === \"1:N\" || relation.cardinality === \"N:M\";\n\tconst optional = !list && (relation.cardinality === \"1:1\" || relation.cardinality === \"N:1\") && relation.nullable === true;\n\treturn {\n\t\tkind: \"field\",\n\t\tname: entry.fieldName,\n\t\ttypeName: target.name,\n\t\t...ifDefined(\"typeNamespaceId\", typeNamespaceId),\n\t\toptional,\n\t\tlist,\n\t\tattributes: args.length > 0 ? [buildAttribute(\"field\", \"relation\", args)] : [],\n\t\tspan: SYNTHETIC_SPAN\n\t};\n}\n/** The relations of each model, keyed by the model's coordinate. */\nfunction relationsByModel(relations) {\n\tconst byModel = /* @__PURE__ */ new Map();\n\tfor (const entry of relations) {\n\t\tconst key = modelCoordinate(entry.owner.namespaceId, entry.owner.name);\n\t\tconst bucket = byModel.get(key) ?? [];\n\t\tbucket.push(entry);\n\t\tbyModel.set(key, bucket);\n\t}\n\treturn byModel;\n}\n/**\n* The relation names to pin. A pair needs one when either of its models\n* carries more than one relation to the other; a many-to-many list field\n* additionally pins the junction-side relation it travels through, so that\n* relation is named too.\n*/\nfunction resolvePinnedRelations(relations, relationsByModel) {\n\tconst pairCounts = /* @__PURE__ */ new Map();\n\tfor (const entry of relations) {\n\t\tconst key = JSON.stringify([modelCoordinate(entry.owner.namespaceId, entry.owner.name), entry.targetCoordinate]);\n\t\tpairCounts.set(key, (pairCounts.get(key) ?? 0) + 1);\n\t}\n\tconst ambiguous = (entry) => {\n\t\tconst ownerCoordinate = modelCoordinate(entry.owner.namespaceId, entry.owner.name);\n\t\tconst forward = pairCounts.get(JSON.stringify([ownerCoordinate, entry.targetCoordinate])) ?? 0;\n\t\tconst backward = pairCounts.get(JSON.stringify([entry.targetCoordinate, ownerCoordinate])) ?? 0;\n\t\treturn forward > 1 || backward > 1;\n\t};\n\tconst pinned = /* @__PURE__ */ new Set();\n\tfor (const entry of relations) {\n\t\tif (!ambiguous(entry)) continue;\n\t\tconst owning = isOwningRelation(entry) ? entry : entry.relation.cardinality === \"N:M\" ? junctionParentRelation(entry, relationsByModel) : owningPartner(entry, relationsByModel);\n\t\tif (owning !== void 0) pinned.add(relationKey(owning));\n\t}\n\treturn pinned;\n}\n/**\n* Relation fields in the order their foreign keys appear in storage, so the\n* `foreignKeys` the PSL source derives come back in the same order. A relation\n* that owns no foreign key keeps its place at the end.\n*/\nfunction orderedByForeignKey(entry, relations) {\n\tconst positions = /* @__PURE__ */ new Map();\n\tfor (const relation of relations) {\n\t\tconst target = relation.relation.on.localFields.map((fieldName) => relation.owner.storage.fields[fieldName]?.column ?? fieldName);\n\t\tconst position = entry.table.foreignKeys.findIndex((fk) => fk.source.columns.length === target.length && fk.source.columns.every((column, index) => column === target[index]));\n\t\tpositions.set(relation, isOwningRelation(relation) && position >= 0 ? position : relations.length);\n\t}\n\treturn [...relations].sort((a, b) => (positions.get(a) ?? 0) - (positions.get(b) ?? 0));\n}\n/**\n* The relation fields of one model, in the order of its foreign keys. Each foreign key an owning\n* relation travels is added to `travelledForeignKeys`.\n*/\nfunction buildRelationFields(input) {\n\tconst fields = [];\n\tfor (const modelRelation of orderedByForeignKey(input.entry, input.relations)) {\n\t\trefuseUnwritableName(\"field\", modelRelation.fieldName);\n\t\tconst target = relationTarget(modelRelation, input.modelsByCoordinate);\n\t\tconst junctionRelation = modelRelation.relation.cardinality === \"N:M\" ? junctionParentRelation(modelRelation, input.relationsByModel) : void 0;\n\t\tif (modelRelation.relation.cardinality === \"N:M\" && junctionRelation === void 0) refuseManyToManyWithoutJunctionRelation(modelRelation.owner.name, modelRelation.fieldName);\n\t\tconst owning = isOwningRelation(modelRelation) ? modelRelation : modelRelation.relation.cardinality === \"N:M\" ? junctionRelation : owningPartner(modelRelation, input.relationsByModel);\n\t\tif (owning === void 0) refuseBackRelationWithoutOwningRelation({\n\t\t\tmodelName: modelRelation.owner.name,\n\t\t\tfieldName: modelRelation.fieldName,\n\t\t\ttargetModel: target.name\n\t\t});\n\t\tconst name = input.pinned.has(relationKey(owning)) ? relationName(owning) : void 0;\n\t\tif (isOwningRelation(modelRelation)) {\n\t\t\tconst foreignKey = foreignKeyFor(modelRelation, target);\n\t\t\tif (foreignKey !== void 0) input.travelledForeignKeys.add(foreignKey);\n\t\t}\n\t\tfields.push(buildRelationField({\n\t\t\tentry: modelRelation,\n\t\t\ttarget,\n\t\t\tname,\n\t\t\townerIsSingleTableVariant: input.variant?.singleTable === true\n\t\t}));\n\t}\n\treturn fields;\n}\n/**\n* The model a relation points at. A relation into another contract space is\n* refused: the printer does not write one yet.\n*/\nfunction relationTarget(entry, modelsByCoordinate) {\n\tconst { to } = entry.relation;\n\trefuseRelationToOtherContractSpace({\n\t\tmodelName: entry.owner.name,\n\t\tfieldName: entry.fieldName,\n\t\ttargetModel: to.model,\n\t\tspace: to.space\n\t});\n\tconst target = modelsByCoordinate.get(entry.targetCoordinate);\n\tassertDefined(target, `relation \"${entry.owner.name}.${entry.fieldName}\" targets model \"${to.namespace}.${to.model}\", which the contract does not declare`);\n\treturn target;\n}\n//#endregion\n//#region src/core/psl-print/row-level-security.ts\n/**\n* The storage tables of one namespace that have row-level security enabled,\n* each written as `@@rls` on its model. The PSL source files each one under\n* its table name, in the namespace of its model.\n*/\nfunction rlsEnabledTables(namespaceId, entries) {\n\tconst tables = /* @__PURE__ */ new Set();\n\tfor (const [name, entity] of Object.entries(entries ?? {})) {\n\t\tinvariant(entity instanceof PostgresRlsEnablement, `\"rls\" entry \"${name}\" in namespace \"${namespaceId}\" is not a row-level security setting`);\n\t\trefuseEntryInOtherNamespace({\n\t\t\tnamespaceId,\n\t\t\tkind: \"rls\",\n\t\t\tname,\n\t\t\trecordedNamespaceId: entity.namespaceId\n\t\t});\n\t\trefuseEntryFiledUnderAnotherName({\n\t\t\tnamespaceId,\n\t\t\tkind: \"rls\",\n\t\t\tname,\n\t\t\treadsBackAs: entity.tableName\n\t\t});\n\t\ttables.add(entity.tableName);\n\t}\n\treturn tables;\n}\n/**\n* One `role <name> {}` block per role. The PSL source reads a role block only\n* inside `namespace unbound`, and files it under its name.\n*/\nfunction buildRoleBlocks(namespaceId, entries) {\n\treturn Object.entries(entries ?? {}).map(([name, entity]) => {\n\t\tinvariant(entity instanceof PostgresRole, `\"role\" entry \"${name}\" in namespace \"${namespaceId}\" is not a role`);\n\t\trefuseRoleOutsideUnbound(namespaceId, name);\n\t\trefuseEntryInOtherNamespace({\n\t\t\tnamespaceId,\n\t\t\tkind: \"role\",\n\t\t\tname,\n\t\t\trecordedNamespaceId: entity.namespaceId\n\t\t});\n\t\trefuseEntryFiledUnderAnotherName({\n\t\t\tnamespaceId,\n\t\t\tkind: \"role\",\n\t\t\tname,\n\t\t\treadsBackAs: entity.name\n\t\t});\n\t\trefuseUnwritableName(\"role\", entity.name);\n\t\treturn {\n\t\t\tkind: \"role\",\n\t\t\tkeyword: \"role\",\n\t\t\tname: entity.name,\n\t\t\tparameters: {},\n\t\t\tblockAttributes: [],\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t};\n\t});\n}\n/**\n* Whether the PSL source, reading a policy block named `head`, derives this\n* policy's name: the block name with the hash of the policy's content for a\n* wire-named policy, or the `@@map` name for an exact one.\n*/\nfunction policyNameReadsBack(head, policy) {\n\tif (policy.prefix === void 0) return true;\n\tconst hash = computeContentHash({\n\t\t...policy.using === void 0 ? {} : { using: policy.using },\n\t\t...policy.withCheck === void 0 ? {} : { withCheck: policy.withCheck },\n\t\troles: policy.roles,\n\t\toperation: policy.operation,\n\t\tpermissive: policy.permissive\n\t});\n\treturn policy.prefix === head && policy.name === formatWireName(head, hash);\n}\n/**\n* One `policy_<operation>` block per policy, named by its entry key, which is\n* the block head it was authored under. A policy with an exact name also\n* prints `@@map` with that name.\n*/\nfunction buildPolicyBlocks(input) {\n\treturn Object.entries(input.entries ?? {}).map(([head, policy]) => {\n\t\tinvariant(policy instanceof PostgresRlsPolicy, `\"policy\" entry \"${head}\" in namespace \"${input.namespaceId}\" is not a policy`);\n\t\trefuseUnwritableName(\"policy\", head);\n\t\trefuseEntryInOtherNamespace({\n\t\t\tnamespaceId: input.namespaceId,\n\t\t\tkind: \"policy\",\n\t\t\tname: head,\n\t\t\trecordedNamespaceId: policy.namespaceId\n\t\t});\n\t\tconst modelName = input.modelNameForTable(policy.tableName);\n\t\tif (modelName === void 0) refusePolicyWithoutModel(policy);\n\t\tif (!input.rlsTables.has(policy.tableName)) refusePolicyWithoutRls(policy);\n\t\tif (!policyNameReadsBack(head, policy)) refusePolicyNameNotDerived(policy);\n\t\tfor (const role of policy.roles) refuseUnwritableName(\"role\", role);\n\t\trefuseSqlTextThatDoesNotReadBack({\n\t\t\tkind: \"policy\",\n\t\t\tnamespaceId: policy.namespaceId,\n\t\t\ttable: policy.tableName,\n\t\t\tname: policy.name,\n\t\t\ttexts: [policy.using, policy.withCheck]\n\t\t});\n\t\treturn {\n\t\t\tkind: \"policy\",\n\t\t\tkeyword: POLICY_BLOCK_KEYWORDS[policy.operation],\n\t\t\tname: head,\n\t\t\tparameters: {\n\t\t\t\ttarget: {\n\t\t\t\t\texpression: modelName,\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t},\n\t\t\t\troles: {\n\t\t\t\t\texpression: `[${policy.roles.join(\", \")}]`,\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t},\n\t\t\t\t...policy.using !== void 0 ? { using: {\n\t\t\t\t\texpression: printSqlExpressionLiteral(policy.using),\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t} } : {},\n\t\t\t\t...policy.withCheck !== void 0 ? { withCheck: {\n\t\t\t\t\texpression: printSqlExpressionLiteral(policy.withCheck),\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t} } : {},\n\t\t\t\t...policy.permissive ? {} : { permissive: {\n\t\t\t\t\texpression: \"false\",\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t} }\n\t\t\t},\n\t\t\tblockAttributes: policy.prefix === void 0 ? [{\n\t\t\t\tname: \"map\",\n\t\t\t\targs: [{\n\t\t\t\t\tkind: \"positional\",\n\t\t\t\t\tvalue: `\"${escapePslString(policy.name)}\"`,\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t}],\n\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t}] : [],\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t};\n\t});\n}\n//#endregion\n//#region src/core/psl-print/column-defaults.ts\n/**\n* The `@default(…)` attribute for a storage column, or `undefined` when the column carries no\n* default.\n*\n* A literal prints as the PSL literal the data type of the column's codec reads back, through the\n* stack's data types, with the mapping `contract infer` uses. An enum column's default is a member\n* name, which reads as text; a domain enum's literal prints as the member name that carries it.\n* `now()` and `autoincrement()` print by name; every other function default prints as a `sql`\n* tagged literal.\n*\n* A literal is refused when the column's codec has no data type in the stack, or when no PSL\n* literal of that data type reads back as the stored value.\n*/\nfunction buildColumnDefault(input) {\n\tconst columnDefault = input.column.default;\n\tif (columnDefault === void 0) return;\n\tconst coordinate = `\"${input.namespaceId}\".\"${input.tableName}\".\"${input.columnName}\"`;\n\tif (input.domainEnum !== void 0 && columnDefault.kind === \"literal\") {\n\t\tconst memberName = input.domainEnum.members.find((member) => member.value === columnDefault.value)?.name;\n\t\tif (memberName === void 0) refuseDefaultOutsideEnum({\n\t\t\tcoordinate,\n\t\t\tvalue: columnDefault.value,\n\t\t\tpslTypeName: input.pslTypeName\n\t\t});\n\t\treturn buildAttribute(\"field\", \"default\", [positionalArg(memberName)]);\n\t}\n\tconst { context } = input;\n\tconst result = mapDefault(columnDefault, {\n\t\tdataTypes: context.dataTypes,\n\t\tcolumnCodec: context.codecLookup.descriptorFor(input.isEnum ? PG_TEXT_CODEC_ID : input.column.codecId),\n\t\tlist: input.column.many !== false\n\t});\n\tif (result === void 0) refuseUnwritableLiteralDefault({\n\t\tcoordinate,\n\t\twritten: columnDefault.kind === \"literal\" ? JSON.stringify(columnDefault.value) : columnDefault.expression,\n\t\tpslTypeName: input.pslTypeName\n\t});\n\treturn parseDefaultAttributeString(result.attribute);\n}\n//#endregion\n//#region src/core/psl-print/generated-values.ts\n/**\n* The `temporal.*` field preset each codec with a \"now\" generator is authored through. The target\n* contributes the presets; `test/integration/test/psl-print/generated-values-roundtrip.integration.test.ts` writes and\n* reads back every one the stack contributes, so this table cannot drift from them.\n*/\nconst TEMPORAL_PRESET_NAMES = /* @__PURE__ */ new Map([\n\t[PG_TIMESTAMP_TEMPORAL_CODEC_ID, \"timestamp\"],\n\t[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, \"timestamptz\"],\n\t[PG_TIMESTAMP_STRING_CODEC_ID, \"timestampString\"],\n\t[PG_TIMESTAMPTZ_STRING_CODEC_ID, \"timestamptzString\"],\n\t[PG_TIMESTAMPTZ_DATE_CODEC_ID, \"timestamptzJsDate\"]\n]);\nconst GENERATOR_CALLS = /* @__PURE__ */ new Map([\n\t[\"uuidv4\", () => \"uuid()\"],\n\t[\"uuidv7\", () => \"uuid(7)\"],\n\t[\"cuid2\", () => \"cuid(2)\"],\n\t[\"ulid\", () => \"ulid()\"],\n\t[\"nanoid\", (params) => typeof params?.[\"size\"] === \"number\" ? `nanoid(${params[\"size\"]})` : \"nanoid()\"]\n]);\n/**\n* How one column's execution generators are written in PSL: an id generator as a `@default(<fn>())`\n* attribute, and a wall-clock-now generator as the `temporal.*` preset the column's codec is\n* authored through.\n*/\nfunction buildExecutionDefault(input) {\n\tconst { executionDefault, codecId, coordinate } = input;\n\tconst onCreateId = executionDefault.onCreate?.id;\n\tconst onUpdateId = executionDefault.onUpdate?.id;\n\tconst nowGeneratorId = postgresNowGeneratorIdFor(codecId);\n\tconst presetName = TEMPORAL_PRESET_NAMES.get(codecId);\n\tif (nowGeneratorId !== void 0 && presetName !== void 0) {\n\t\tconst onCreate = onCreateId === nowGeneratorId;\n\t\tconst onUpdate = onUpdateId === nowGeneratorId;\n\t\tif (onCreate || onUpdate) {\n\t\t\tif (onCreateId !== void 0 && !onCreate || onUpdateId !== void 0 && !onUpdate) refuseNowGeneratorPairedWithAnother({\n\t\t\t\tcoordinate,\n\t\t\t\tonCreate: onCreateId,\n\t\t\t\tonUpdate: onUpdateId,\n\t\t\t\tother: onCreate ? onUpdateId : onCreateId\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tkind: \"temporal\",\n\t\t\t\tphases: {\n\t\t\t\t\tpresetName,\n\t\t\t\t\tonCreate,\n\t\t\t\t\tonUpdate\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\tconst phases = {\n\t\tcoordinate,\n\t\tonCreate: onCreateId,\n\t\tonUpdate: onUpdateId\n\t};\n\tif (onUpdateId !== void 0) refuseGeneratorOnUpdate(phases);\n\tconst call = onCreateId === void 0 ? void 0 : GENERATOR_CALLS.get(onCreateId);\n\tif (call === void 0) refuseGeneratorWithoutPslFunction(phases);\n\treturn {\n\t\tkind: \"attribute\",\n\t\tattribute: buildAttribute(\"field\", \"default\", [positionalArg(call(executionDefault.onCreate?.params))])\n\t};\n}\n/** The `temporal.<preset>(precision?, onCreate: now, onUpdate: now)` argument list. */\nfunction temporalPresetArguments(input) {\n\tconst args = [];\n\tif (typeof input.precision === \"number\") args.push(positionalArg(String(input.precision)));\n\tif (input.phases.onCreate) args.push(namedArg(\"onCreate\", \"now\"));\n\tif (input.phases.onUpdate) args.push(namedArg(\"onUpdate\", \"now\"));\n\treturn args;\n}\n//#endregion\n//#region src/core/psl-print/scalar-fields.ts\n/** The generated values of the contract, keyed by the column they fill. */\nfunction executionDefaultsByColumn(contract) {\n\tconst byColumn = /* @__PURE__ */ new Map();\n\tfor (const entry of contract.execution?.mutations.defaults ?? []) byColumn.set(JSON.stringify([\n\t\tentry.ref.namespace,\n\t\tentry.ref.entry,\n\t\tentry.ref.field\n\t]), entry);\n\treturn byColumn;\n}\nfunction scalarFieldAttributes(input) {\n\tconst attributes = [];\n\tif (input.isSingleColumnId) attributes.push(buildAttribute(\"field\", \"id\", input.primaryKeyName === void 0 ? [] : [namedArg(\"map\", `\"${escapePslString(input.primaryKeyName)}\"`)]));\n\tconst columnDefault = input.generatedDefault ?? buildColumnDefault({\n\t\tcolumn: input.column,\n\t\tpslTypeName: input.pslTypeName,\n\t\tisEnum: input.isEnum,\n\t\tdomainEnum: input.domainEnum,\n\t\tnamespaceId: input.namespaceId,\n\t\ttableName: input.tableName,\n\t\tcolumnName: input.columnName,\n\t\tcontext: input.context\n\t});\n\tif (columnDefault !== void 0) attributes.push(columnDefault);\n\tfor (const kind of input.column.noCheck ?? []) attributes.push(buildAttribute(\"field\", \"noCheck\", [positionalArg(kind)]));\n\tconst mapName = pslFieldMapName(input.fieldName, input.columnName);\n\tif (mapName !== void 0) attributes.push(buildMapAttribute(\"field\", mapName));\n\treturn attributes;\n}\n/**\n* The scalar and value-object fields of one model, one per column its storage names. Each generated\n* value written with a field is added to `writtenExecutionDefaults`.\n*/\nfunction buildScalarFields(input) {\n\tconst { entry, variant, enums, domainEnums, typeMap, context, executionDefaults } = input;\n\tconst primaryKeyColumns = variant === void 0 ? entry.table.primaryKey?.columns ?? [] : [];\n\tconst fields = [];\n\trefuseFieldsWithoutColumn(entry);\n\tfor (const [fieldName, fieldStorage] of Object.entries(entry.storage.fields)) {\n\t\tconst columnName = fieldStorage.column;\n\t\tconst coordinate = `\"${entry.namespaceId}\".\"${entry.tableName}\".\"${columnName}\"`;\n\t\tconst column = entry.table.columns[columnName];\n\t\tconst field = entry.model.fields[fieldName];\n\t\tassertDefined(column, `column ${coordinate} is not declared by its table`);\n\t\tif (field === void 0) refuseStorageOfUndeclaredField({\n\t\t\tentry,\n\t\t\tfieldName,\n\t\t\tcoordinate\n\t\t});\n\t\trefuseUnwritableName(\"field\", fieldName);\n\t\trefuseUnwritableMappedName(\"column\", columnName);\n\t\trefuseUnwritableFieldShape(field, coordinate);\n\t\trefuseColumnControl(column, coordinate);\n\t\trefuseFieldColumnMismatch({\n\t\t\tfield,\n\t\t\tcolumn,\n\t\t\tcoordinate,\n\t\t\tmodelName: entry.name,\n\t\t\tsingleTableVariant: variant?.singleTable === true,\n\t\t\tdomainEnumNames: input.defaultDomainEnumNames,\n\t\t\tnamedTypes: input.namedTypes\n\t\t});\n\t\tif (column.typeRef !== void 0) refuseColumnDifferingFromNamedType({\n\t\t\tcolumn,\n\t\t\ttypeRef: column.typeRef,\n\t\t\tnamedType: input.namedTypes[column.typeRef],\n\t\t\tcoordinate\n\t\t});\n\t\tconst columnType = column.typeRef !== void 0 ? { typeName: column.typeRef } : field.type.kind === \"valueObject\" ? { typeName: field.type.name } : buildColumnType({\n\t\t\tcolumn,\n\t\t\ttypeMap,\n\t\t\tauthoringTypes: context.authoringContributions.type,\n\t\t\tdataTypeLookup: context.dataTypes.lookup,\n\t\t\tenumBlockNames: enums.blockNamesByTypeName,\n\t\t\tcoordinate\n\t\t});\n\t\tlet { typeName, typeConstructor } = columnType;\n\t\tconst execution = executionDefaults.get(JSON.stringify([\n\t\t\tentry.namespaceId,\n\t\t\tentry.tableName,\n\t\t\tcolumnName\n\t\t]));\n\t\tlet generatedDefault;\n\t\tif (execution !== void 0) {\n\t\t\tinput.writtenExecutionDefaults.add(execution);\n\t\t\tconst built = buildExecutionDefault({\n\t\t\t\texecutionDefault: execution,\n\t\t\t\tcodecId: column.codecId,\n\t\t\t\tcoordinate\n\t\t\t});\n\t\t\tif (built.kind === \"temporal\") {\n\t\t\t\ttypeName = `temporal.${built.phases.presetName}`;\n\t\t\t\ttypeConstructor = {\n\t\t\t\t\tkind: \"typeConstructor\",\n\t\t\t\t\tpath: [\"temporal\", built.phases.presetName],\n\t\t\t\t\targs: temporalPresetArguments({\n\t\t\t\t\t\tphases: built.phases,\n\t\t\t\t\t\tprecision: column.typeParams?.[\"precision\"]\n\t\t\t\t\t}),\n\t\t\t\t\tspan: SYNTHETIC_SPAN\n\t\t\t\t};\n\t\t\t} else if (column.default !== void 0) refuseGeneratorWithDatabaseDefault({\n\t\t\t\tcoordinate,\n\t\t\t\tonCreate: execution.onCreate?.id\n\t\t\t});\n\t\t\telse generatedDefault = built.attribute;\n\t\t}\n\t\tfields.push({\n\t\t\tkind: \"field\",\n\t\t\tname: fieldName,\n\t\t\ttypeName,\n\t\t\t...ifDefined(\"typeConstructor\", typeConstructor),\n\t\t\toptional: field.nullable,\n\t\t\tlist: !!field.many,\n\t\t\telementOptional: !!field.many && field.many.elementNullable,\n\t\t\tattributes: scalarFieldAttributes({\n\t\t\t\tcolumn,\n\t\t\t\tfieldName,\n\t\t\t\tnamespaceId: entry.namespaceId,\n\t\t\t\ttableName: entry.tableName,\n\t\t\t\tcolumnName,\n\t\t\t\tisSingleColumnId: primaryKeyColumns.length === 1 && primaryKeyColumns[0] === columnName,\n\t\t\t\tprimaryKeyName: entry.table.primaryKey?.name,\n\t\t\t\tpslTypeName: columnType.typeName,\n\t\t\t\tisEnum: column.codecId === PG_ENUM_CODEC_ID,\n\t\t\t\tdomainEnum: column.codecId === \"pg/enum@1\" || column.valueSet === void 0 ? void 0 : domainEnums[column.valueSet.entityName],\n\t\t\t\tgeneratedDefault,\n\t\t\t\tcontext\n\t\t\t}),\n\t\t\tspan: SYNTHETIC_SPAN\n\t\t});\n\t}\n\treturn fields;\n}\n//#endregion\n//#region src/core/psl-print/psl-contract.ts\n/** The native enums of one namespace, keyed as the contract keys them. */\nfunction nativeEnumsOf(namespaceId, entries) {\n\tconst nativeEnums = /* @__PURE__ */ new Map();\n\tfor (const [name, entity] of Object.entries(entries[\"native_enum\"] ?? {})) {\n\t\tinvariant(PostgresNativeEnum.is(entity), `\"native_enum\" entry \"${name}\" in namespace \"${namespaceId}\" is not a native enum`);\n\t\tnativeEnums.set(name, entity);\n\t}\n\treturn nativeEnums;\n}\n/** The value sets the PSL source derives for a namespace from the enum blocks written for it. */\nfunction derivedValueSetsOf(namespaceId, enums, defaultDomainEnums) {\n\tconst derived = new Map(enums.derivedValueSets);\n\tif (namespaceId !== \"public\") return derived;\n\tfor (const [name, domainEnum] of Object.entries(defaultDomainEnums)) {\n\t\tif (derived.has(name)) refuseEnumAndNativeEnumSharingName(namespaceId, name);\n\t\tderived.set(name, domainEnum.members.map((member) => member.value));\n\t}\n\treturn derived;\n}\n/** One model of a namespace, with its fields and attributes. */\nfunction buildModel(all, entry, enums, rlsTables) {\n\tconst { models, variants, relationsByModel, byCoordinate } = all;\n\trefuseUnwritableName(\"model\", entry.name);\n\trefuseModelOwner(entry);\n\tconst variant = variants.get(entry);\n\tif (variant !== void 0 && !variant.singleTable) refuseUnderivedVariantLink(entry, variant);\n\tconst singleTableVariants = models.filter((other) => other !== entry && variants.get(other)?.singleTable === true && variants.get(other)?.base === entry);\n\tconst travelledForeignKeys = /* @__PURE__ */ new Set();\n\tconst fields = [...buildScalarFields({\n\t\tentry,\n\t\tvariant,\n\t\tenums,\n\t\tdomainEnums: all.contract.domain.namespaces[entry.namespaceId]?.enum ?? {},\n\t\ttypeMap: all.typeMap,\n\t\tcontext: all.context,\n\t\texecutionDefaults: all.executionDefaults,\n\t\twrittenExecutionDefaults: all.writtenExecutionDefaults,\n\t\tdefaultDomainEnumNames: new Set(Object.keys(all.defaultDomainEnums)),\n\t\tnamedTypes: all.contract.storage.types ?? {}\n\t}), ...buildRelationFields({\n\t\tentry,\n\t\tvariant,\n\t\trelations: relationsByModel.get(modelCoordinate(entry.namespaceId, entry.name)) ?? [],\n\t\trelationsByModel,\n\t\tmodelsByCoordinate: byCoordinate,\n\t\tpinned: all.pinned,\n\t\ttravelledForeignKeys\n\t})];\n\tif (variant?.singleTable !== true) for (const other of singleTableVariants) for (const relation of relationsByModel.get(modelCoordinate(entry.namespaceId, other.name)) ?? []) {\n\t\tconst target = byCoordinate.get(relation.targetCoordinate);\n\t\tconst fk = target === void 0 ? void 0 : foreignKeyFor(relation, target);\n\t\tif (fk !== void 0) travelledForeignKeys.add(fk);\n\t}\n\trefuseUntravelledForeignKeys(entry, variant, travelledForeignKeys);\n\tconst checks = derivedChecks({\n\t\ttable: entry.table,\n\t\ttableName: entry.tableName,\n\t\tmanaged: effectiveControlPolicy(entry.table.control, all.contract.defaultControlPolicy) === \"managed\",\n\t\tdomainEnumValues: all.domainEnumValues\n\t});\n\tif (variant?.singleTable !== true) refuseUnderivedChecks(entry, checks);\n\treturn {\n\t\tkind: \"model\",\n\t\tname: entry.name,\n\t\tfields,\n\t\tattributes: buildModelAttributes({\n\t\t\tentry,\n\t\t\tvariant,\n\t\t\tsingleTableVariants,\n\t\t\tderivedChecksByName: checks,\n\t\t\trlsEnabled: rlsTables.has(entry.tableName)\n\t\t}),\n\t\tspan: SYNTHETIC_SPAN\n\t};\n}\n/**\n* The namespace block of one storage namespace: its models, value objects, enum blocks, roles and\n* policies. `undefined` when the namespace holds none of them.\n*/\nfunction buildNamespace(all, namespaceId, namespace) {\n\tconst { contract, models, variants } = all;\n\trefuseUnprintedEntryKinds(namespaceId, namespace.entries);\n\tconst valueSets = new Map(Object.entries(namespace.entries.valueSet ?? {}).map(([name, valueSet]) => [name, valueSet.values]));\n\tconst enums = buildNativeEnumBlocksForNamespace({\n\t\tnamespaceId,\n\t\tnativeEnums: nativeEnumsOf(namespaceId, namespace.entries),\n\t\tvalueSets,\n\t\tcolumns: models.filter((entry) => entry.namespaceId === namespaceId).flatMap((entry) => Object.values(entry.table.columns))\n\t});\n\trefuseUnderivedValueSets({\n\t\tnamespaceId,\n\t\tactual: valueSets,\n\t\tderived: derivedValueSetsOf(namespaceId, enums, all.defaultDomainEnums)\n\t});\n\tconst rlsTables = rlsEnabledTables(namespaceId, namespace.entries[\"rls\"]);\n\tconst namespaceModels = models.filter((entry) => entry.namespaceId === namespaceId).map((entry) => buildModel(all, entry, enums, rlsTables));\n\tconst compositeTypes = buildCompositeTypes({\n\t\tcontract,\n\t\tnamespaceId,\n\t\ttypeMap: all.typeMap,\n\t\tcontext: all.context,\n\t\tenumBlockNames: enums.blockNamesByTypeName,\n\t\tdomainEnums: all.defaultDomainEnums\n\t});\n\tconst modelNameForTable = (tableName) => models.find((entry) => entry.namespaceId === namespaceId && entry.tableName === tableName && variants.get(entry)?.singleTable !== true)?.name;\n\tfor (const tableName of rlsTables) if (modelNameForTable(tableName) === void 0) refuseRlsWithoutModel(namespaceId, tableName);\n\tconst blocks = [\n\t\t...enums.blocks,\n\t\t...buildRoleBlocks(namespaceId, namespace.entries[\"role\"]),\n\t\t...buildPolicyBlocks({\n\t\t\tnamespaceId,\n\t\t\tentries: namespace.entries[\"policy\"],\n\t\t\tmodelNameForTable,\n\t\t\trlsTables\n\t\t})\n\t];\n\tif (namespaceModels.length === 0 && blocks.length === 0 && compositeTypes.length === 0) return;\n\trefuseNamespaceNamedUnbound(namespaceId);\n\tconst name = pslNamespaceName(namespaceId);\n\trefuseUnwritableName(\"namespace\", name);\n\treturn makePslNamespace({\n\t\tkind: \"namespace\",\n\t\tname,\n\t\tentries: makePslNamespaceEntries(namespaceModels, compositeTypes, blocks),\n\t\tspan: SYNTHETIC_SPAN\n\t});\n}\nfunction refuseUnwritableTableNames(contract) {\n\tfor (const domainNamespace of Object.values(contract.domain.namespaces)) for (const model of Object.values(domainNamespace.models)) refuseUnwritableMappedName(\"table\", blindCast(model.storage).table);\n}\n/**\n* Builds the Prisma 8 PSL document a Postgres contract was, or would have been, authored as: every\n* model with its columns, keys, indexes and relations, every value object, every named type and\n* every native enum, in the namespace block that carries it.\n*\n* Read back by the PSL contract source with the same stack, the document yields the contract it was\n* built from. Anything the language cannot carry is refused by name. `contract` must be one the\n* Postgres contract serializer accepted: its structure is asserted, not checked again.\n*/\nfunction buildPostgresPslContract(contract, context) {\n\trefuseUnwritableTableNames(contract);\n\tconst models = indexContractModels(contract);\n\trefuseDuplicateModelNames(models);\n\tconst byCoordinate = modelsByCoordinate(models);\n\tconst relations = collectRelations(models);\n\tconst byModel = relationsByModel(relations);\n\tconst defaultDomainEnums = contract.domain.namespaces[\"public\"]?.enum ?? {};\n\tconst all = {\n\t\tcontract,\n\t\tcontext,\n\t\ttypeMap: createPostgresTypeMap(),\n\t\tmodels,\n\t\tbyCoordinate,\n\t\tvariants: new Map(models.map((entry) => [entry, variantInfo(entry, byCoordinate)])),\n\t\trelationsByModel: byModel,\n\t\tpinned: resolvePinnedRelations(relations, byModel),\n\t\texecutionDefaults: executionDefaultsByColumn(contract),\n\t\twrittenExecutionDefaults: /* @__PURE__ */ new Set(),\n\t\tdefaultDomainEnums,\n\t\tdomainEnumValues: new Map(Object.entries(defaultDomainEnums).map(([name, domainEnum]) => [name, domainEnum.members.map((member) => member.value)]))\n\t};\n\tconst namespaces = [];\n\trefuseEnumsOutsideDefaultNamespace(contract);\n\tconst topLevelEnums = buildDomainEnumBlocks(defaultDomainEnums);\n\tif (topLevelEnums.length > 0) namespaces.push(makePslNamespace({\n\t\tkind: \"namespace\",\n\t\tname: UNSPECIFIED_PSL_NAMESPACE_ID,\n\t\tentries: makePslNamespaceEntries([], [], topLevelEnums),\n\t\tspan: SYNTHETIC_SPAN\n\t}));\n\tconst writtenStorageNamespaces = /* @__PURE__ */ new Set();\n\tfor (const [namespaceId, namespace] of Object.entries(contract.storage.namespaces)) {\n\t\tconst built = buildNamespace(all, namespaceId, namespace);\n\t\tif (built === void 0) continue;\n\t\twrittenStorageNamespaces.add(namespaceId);\n\t\tnamespaces.push(built);\n\t}\n\trefuseUnmodelledTablesAndColumns(contract, models, all.variants);\n\trefuseUnwrittenNamespaces({\n\t\tcontract,\n\t\tmodels,\n\t\twrittenStorageNamespaces\n\t});\n\trefuseUnwrittenExecutionDefaults(contract, all.writtenExecutionDefaults);\n\trefuseContractMeta(contract);\n\trefuseUnderivedRoots(contract, models, all.variants);\n\treturn {\n\t\tkind: \"document\",\n\t\tsourceId: \"<contract>\",\n\t\tnamespaces,\n\t\t...ifDefined(\"types\", buildTypesBlock(contract, all.typeMap, context)),\n\t\tspan: SYNTHETIC_SPAN\n\t};\n}\n//#endregion\n//#region src/core/type-constructors.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel. Each names a codec; the column's database type is its data type's.\n*\n* The type position is the only storage decider: a mutation-default generator\n* (`@default(uuid())`) never re-picks a column's storage.\n*/\nconst postgresScalarAuthoringTypes = {\n\tString: {\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\tBoolean: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A true or false value stored as PostgreSQL boolean.\",\n\t\toutput: { codecId: \"pg/bool@1\" }\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 32-bit integer represented as a JavaScript number.\",\n\t\toutput: { codecId: \"pg/int4@1\" }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 64-bit integer represented as a JavaScript bigint.\",\n\t\toutput: { codecId: \"pg/int8@1\" }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A double-precision floating-point number.\",\n\t\toutput: { codecId: \"pg/float8@1\" }\n\t},\n\tDecimal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An exact decimal value stored as PostgreSQL numeric.\",\n\t\toutput: { codecId: \"pg/numeric@1\" }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as PostgreSQL timestamptz and represented as Temporal.Instant.\",\n\t\toutput: { codecId: \"pg/timestamptz-temporal@1\" }\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A JSON value stored as PostgreSQL json.\",\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\tBytes: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Binary data stored as PostgreSQL bytea.\",\n\t\toutput: { codecId: \"pg/bytea@1\" }\n\t}\n};\nconst postgresNativeAuthoringTypes = {\n\tVarChar: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Variable-length text with an optional maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"length\",\n\t\t\tinteger: true,\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@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\tChar: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Fixed-length, blank-padded text with an optional character length.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"length\",\n\t\t\tinteger: true,\n\t\t\toptional: true\n\t\t}],\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\tNumeric: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An exact decimal value with optional precision and scale.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"number\",\n\t\t\tname: \"scale\",\n\t\t\tinteger: true,\n\t\t\toptional: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"pg/numeric@1\",\n\t\t\ttypeParams: {\n\t\t\t\tprecision: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0\n\t\t\t\t},\n\t\t\t\tscale: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tTimestamp: {\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: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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\tTimestamptz: {\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: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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\tTime: {\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: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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\tSmallInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 16-bit integer represented as a JavaScript number.\",\n\t\toutput: { codecId: \"pg/int2@1\" }\n\t},\n\tReal: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A single-precision floating-point number.\",\n\t\toutput: { codecId: \"pg/float4@1\" }\n\t},\n\tDate: {\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 database text rather than Temporal.PlainDate.\",\n\t\toutput: { codecId: \"pg/date-string@1\" }\n\t},\n\tTimestampString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A timestamp without a time zone represented as PostgreSQL text.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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\tdocumentation: \"An instant stored as PostgreSQL timestamptz and represented as a JavaScript Date.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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\tTimestamptzString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A timestamp with time zone represented as PostgreSQL text.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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 PostgreSQL text.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"precision\",\n\t\t\tinteger: true,\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};\n/**\n* The constructors only PSL offers, defined here next to the codecs they name. The adapter contributes them: the TypeScript contract builder builds its `type.*` helpers from the target, so a target contribution would add `type.String()` and the like there. The constructors that should also be `type.*` helpers are the target's own, in `postgresAuthoringTypes`.\n*/\nconst postgresPslTypeConstructors = {\n\t...postgresScalarAuthoringTypes,\n\t...postgresNativeAuthoringTypes\n};\n//#endregion\n//#region src/exports/control.ts\nfunction createPostgresTargetDescriptor() {\n\tsetFallbackTemporal(Temporal);\n\treturn {\n\t\t...postgresTargetDescriptorMeta,\n\t\tcontractSerializer: new PostgresContractSerializer(),\n\t\tschemaVerifier: new PostgresSchemaVerifier(),\n\t\tinferPslContract(schema, context, describedContracts) {\n\t\t\tPostgresDatabaseSchemaNode.assert(schema);\n\t\t\treturn inferPostgresPslContract(schema, context, describedContracts);\n\t\t},\n\t\tbuildPslContract(contract, context) {\n\t\t\treturn buildPostgresPslContract(contract, context);\n\t\t},\n\t\tdiffSchema(input) {\n\t\t\treturn diffPostgresSchema(input);\n\t\t},\n\t\tclassifySubjectGranularity: postgresDiffSubjectGranularity,\n\t\tclassifyEntityKind: postgresDiffSubjectEntityKind,\n\t\tmigrations: {\n\t\t\tcreatePlanner(adapter) {\n\t\t\t\treturn createPostgresMigrationPlanner(adapter);\n\t\t\t},\n\t\t\tcreateRunner(family) {\n\t\t\t\treturn blindCast(createPostgresMigrationRunner(family));\n\t\t\t},\n\t\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\t\treturn postgresContractToSchema(contract, frameworkComponents);\n\t\t\t}\n\t\t},\n\t\tcreate() {\n\t\t\treturn {\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\"\n\t\t\t};\n\t\t},\n\t\t/**\n\t\t* Direct method for SQL-specific usage.\n\t\t* @deprecated Use migrations.createPlanner() for CLI compatibility.\n\t\t*/\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createPostgresMigrationPlanner(adapter);\n\t\t},\n\t\t/**\n\t\t* Direct method for SQL-specific usage.\n\t\t* @deprecated Use migrations.createRunner() for CLI compatibility.\n\t\t*/\n\t\tcreateRunner(family) {\n\t\t\treturn createPostgresMigrationRunner(family);\n\t\t}\n\t};\n}\nconst postgresTargetDescriptor = createPostgresTargetDescriptor();\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresNativeAuthoringTypes, postgresPslTypeConstructors, postgresRenderDefault, postgresScalarAuthoringTypes };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,qBAAqB,OAAO;CACpC,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,QAAQ,QAAQ,KAAK,GAAG,OAAO,OAAO;MAC7F,IAAI,MAAM,QAAQ,GAAG,GAAG,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,GAAG,CAAC;MAC5D,IAAI,OAAO,QAAQ,UAAU,OAAO,OAAO,qBAAqB,UAAU,GAAG,CAAC;MAC9E,OAAO,OAAO;CACnB,OAAO,UAAU,OAAO,OAAO,MAAM,CAAC;AACvC;AACA,SAAS,8BAA8B,QAAQ;CAC9C,OAAO,IAAI,wBAAwB,MAAM;AAC1C;AACA,IAAI,0BAA0B,MAAM;CACnC;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;;;;;;CAMA,MAAM,oBAAoB,SAAS;EAClC,MAAM,SAAS,QAAQ;EACvB,IAAI,QAAQ,UAAU,KAAK,KAAK,QAAQ,UAAU,QAAQ,KAAK,SAAS,MAAM,cAAc,sCAAsC,sCAAsC,QAAQ,MAAM,iCAAiC,QAAQ,KAAK,QAAQ,IAAI,EAAE,MAAM;GACvP,OAAO,QAAQ;GACf,aAA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OAAO;GACR,EAAE;EACH;CACD;CACA,MAAM;EACL,MAAM;EACN,UAAU;EACV,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP,SAAS;GACT,YAAY,EAAE,QAAQ;IACrB,MAAM;IACN,OAAO;GACR,EAAE;EACH;CACD;CACA,SAAS;EACR,MAAM;EACN,UAAU;EACV,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,GAAG;GACF,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP,SAAS;GACT,YAAY;IACX,WAAW;KACV,MAAM;KACN,OAAO;IACR;IACA,OAAO;KACN,MAAM;KACN,OAAO;IACR;GACD;EACD;CACD;CACA,WAAW;EACV,MAAM;EACN,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP,SAAS;GACT,YAAY,EAAE,WAAW;IACxB,MAAM;IACN,OAAO;GACR,EAAE;EACH;CACD;CACA,aAAa;EACZ,MAAM;EACN,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP,SAAS;GACT,YAAY,EAAE,WAAW;IACxB,MAAM;IACN,OAAO;GACR,EAAE;EACH;CACD;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP,SAAS;GACT,YAAY,EAAE,WAAW;IACxB,MAAM;IACN,OAAO;GACR,EAAE;EACH;CACD;CACA,QAAQ;EACP,MAAM;EACN,UAAU;EACV,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP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AM;GACN,SAAS;GACT,UAAU;EACX,CAAC;EACD,QAAQ;GACP,SAAS;GACT,YAAY,EAAE,WAAW;IACxB,MAAM;IACN,OAAO;GACR,EAAE;EACH;CACD;AACD;;;;AAIA,MAAM,8BAA8B;CACnC,GAAG;CACH,GAAG;AACJ;AAGA,SAAS,iCAAiC;CACzC,oBAAoB,QAAQ;CAC5B,OAAO;EACN,GAAG;EACH,oBAAoB,IAAI,2BAA2B;EACnD,gBAAgB,IAAI,uBAAuB;EAC3C,iBAAiB,QAAQ,SAAS,oBAAoB;GACrD,2BAA2B,OAAO,MAAM;GACxC,OAAO,yBAAyB,QAAQ,SAAS,kBAAkB;EACpE;EACA,iBAAiB,UAAU,SAAS;GACnC,OAAO,yBAAyB,UAAU,OAAO;EAClD;EACA,WAAW,OAAO;GACjB,OAAO,mBAAmB,KAAK;EAChC;EACA,4BAA4B;EAC5B,oBAAoB;EACpB,YAAY;GACX,cAAc,SAAS;IACtB,OAAO,+BAA+B,OAAO;GAC9C;GACA,aAAa,QAAQ;IACpB,OAAO,UAAU,8BAA8B,MAAM,CAAC;GACvD;GACA,iBAAiB,UAAU,qBAAqB;IAC/C,OAAO,yBAAyB,UAAU,mBAAmB;GAC9D;EACD;EACA,SAAS;GACR,OAAO;IACN,UAAU;IACV,UAAU;GACX;EACD;;;;;EAKA,cAAc,SAAS;GACtB,OAAO,+BAA+B,OAAO;EAC9C;;;;;EAKA,aAAa,QAAQ;GACpB,OAAO,8BAA8B,MAAM;EAC5C;CACD;AACD;AACA,MAAM,2BAA2B,+BAA+B"}
|
package/dist/{descriptor-meta-ClvaJRgh-Dlo6A0nL.mjs → descriptor-meta-DkzkByC8-WIm-Vvrd.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
|
|
2
2
|
import { A as postgresQualifyColumnType } from "./codecs-BK3J4C0n-B8EnUXZf.mjs";
|
|
3
3
|
import { h as postgresCreateNamespace } from "./postgres-schema-DIaAgaL6-Dmqzjbu5.mjs";
|
|
4
|
-
import { c as postgresAuthoringEntityTypes, d as postgresAuthoringPslBlockDescriptors, f as postgresAuthoringTypes, l as postgresAuthoringFieldPresets, p as postgresLowerEntityHandles, u as postgresAuthoringModelAttributes } from "./authoring-
|
|
4
|
+
import { c as postgresAuthoringEntityTypes, d as postgresAuthoringPslBlockDescriptors, f as postgresAuthoringTypes, l as postgresAuthoringFieldPresets, p as postgresLowerEntityHandles, u as postgresAuthoringModelAttributes } from "./authoring-BsVnEibY-DEWnQRiF.mjs";
|
|
5
5
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-BaFrBceq-ChgvazEN.mjs";
|
|
6
6
|
import { t as postgresDataTypeEntries } from "./data-type-entries-DoR61yeO-BB2cY7rI.mjs";
|
|
7
7
|
import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-iArZEoCE-GhLNDdg-.mjs";
|
|
8
8
|
import { n as postgresIndexTypes } from "./index-types-Bdy_UGfY-CqEPukzT.mjs";
|
|
9
|
-
//#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-
|
|
9
|
+
//#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-DkzkByC8.mjs
|
|
10
10
|
const postgresTargetDescriptorMeta = {
|
|
11
11
|
...postgresTargetDescriptorMetaRuntime,
|
|
12
12
|
defaultNamespaceId: DEFAULT_NAMESPACE_ID,
|
|
@@ -33,4 +33,4 @@ const postgresTargetDescriptorMeta = {
|
|
|
33
33
|
//#endregion
|
|
34
34
|
export { postgresTargetDescriptorMeta as t };
|
|
35
35
|
|
|
36
|
-
//# sourceMappingURL=descriptor-meta-
|
|
36
|
+
//# sourceMappingURL=descriptor-meta-DkzkByC8-WIm-Vvrd.mjs.map
|
package/dist/{descriptor-meta-ClvaJRgh-Dlo6A0nL.mjs.map → descriptor-meta-DkzkByC8-WIm-Vvrd.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-
|
|
1
|
+
{"version":3,"file":"descriptor-meta-DkzkByC8-WIm-Vvrd.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-DkzkByC8.mjs"],"sourcesContent":["import { t as postgresDataTypeEntries } from \"./data-type-entries-DoR61yeO.mjs\";\nimport { E as postgresQualifyColumnType } from \"./codecs-BK3J4C0n.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { a as postgresAuthoringPslBlockDescriptors, i as postgresAuthoringModelAttributes, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from \"./authoring-BsVnEibY.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-DIaAgaL6.mjs\";\nimport { t as postgresRenderCheckExpressions } from \"./check-expressions-BaFrBceq.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-iArZEoCE.mjs\";\nimport { n as postgresIndexTypes } from \"./index-types-Bdy_UGfY.mjs\";\nconst postgresTargetDescriptorMeta = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: DEFAULT_NAMESPACE_ID,\n\tsupportsNamespaces: true,\n\tindexTypes: postgresIndexTypes,\n\tauthoring: {\n\t\ttype: postgresAuthoringTypes,\n\t\tfield: postgresAuthoringFieldPresets,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\tentityTypes: postgresAuthoringEntityTypes,\n\t\tpslBlockDescriptors: postgresAuthoringPslBlockDescriptors,\n\t\tmodelAttributes: postgresAuthoringModelAttributes,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tqualifyColumnType: postgresQualifyColumnType,\n\t\trenderCheckExpressions: postgresRenderCheckExpressions,\n\t\tlowerEntityHandles: postgresLowerEntityHandles\n\t},\n\ttypes: { queryOperationTypes: { import: {\n\t\tpackage: \"@internal/target-postgres/operation-types\",\n\t\tnamed: \"QueryOperationTypes\",\n\t\talias: \"PgTargetQueryOps\"\n\t} } }\n};\n//#endregion\nexport { postgresTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DkzkByC8.mjs.map"],"mappings":";;;;;;;;;AAQA,MAAM,+BAA+B;CACpC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,YAAY;CACZ,WAAW;EACV,MAAM;EACN,OAAO;EACP,WAAW,wBAAwB;EACnC,aAAa;EACb,qBAAqB;EACrB,iBAAiB;EACjB,iBAAiB;EACjB,mBAAmB;EACnB,wBAAwB;EACxB,oBAAoB;CACrB;CACA,OAAO,EAAE,qBAAqB,EAAE,QAAQ;EACvC,SAAS;EACT,OAAO;EACP,OAAO;CACR,EAAE,EAAE;AACL"}
|