@prisma/orm-target-postgres 8.0.0-rc.16-dev.3 → 8.0.0-rc.16-dev.5
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-RtS8vD8U-BvmL3EaF.mjs → adapter-RtS8vD8U-m4U_WTpQ.mjs} +5 -5
- package/dist/{adapter-RtS8vD8U-BvmL3EaF.mjs.map → adapter-RtS8vD8U-m4U_WTpQ.mjs.map} +1 -1
- package/dist/adapter.mjs +5 -5
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.mjs +6 -6
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{authoring-CfPWv_-P-BHAGgGYI.mjs → authoring-vHbPLrW4-BsHR7gUE.mjs} +5 -5
- package/dist/{authoring-CfPWv_-P-BHAGgGYI.mjs.map → authoring-vHbPLrW4-BsHR7gUE.mjs.map} +1 -1
- package/dist/{check-expressions-BRuSxJ5d-CC5OFfR1.mjs → check-expressions-Dlt334zg-CV5Vkh3G.mjs} +3 -3
- package/dist/{check-expressions-BRuSxJ5d-CC5OFfR1.mjs.map → check-expressions-Dlt334zg-CV5Vkh3G.mjs.map} +1 -1
- package/dist/{codec-registry-CyhMngN6-BlKEiEni.mjs → codec-registry-nSGjxm-H-BeUu5zV2.mjs} +4 -4
- package/dist/{codec-registry-CyhMngN6-BlKEiEni.mjs.map → codec-registry-nSGjxm-H-BeUu5zV2.mjs.map} +1 -1
- package/dist/{codecs-hSJgX8qY-fZSDQFIE.mjs → codecs-DelwJv6h-CFbyTJIJ.mjs} +3 -3
- package/dist/{codecs-hSJgX8qY-fZSDQFIE.mjs.map → codecs-DelwJv6h-CFbyTJIJ.mjs.map} +1 -1
- package/dist/{contract-free-DlLLhKi4.d.mts → contract-free-DY8vDIxh.d.mts} +19 -2
- package/dist/contract-free-DY8vDIxh.d.mts.map +1 -0
- package/dist/{contract-free-DAGgx1J-.mjs → contract-free-DaK6wmmo.mjs} +3 -3
- package/dist/contract-free-DaK6wmmo.mjs.map +1 -0
- package/dist/{control-BVAy0J9w.mjs → control-YKrabf1Q.mjs} +11 -11
- package/dist/{control-BVAy0J9w.mjs.map → control-YKrabf1Q.mjs.map} +1 -1
- package/dist/{control-adapter-Co30P4lH-B8vk7fsI.mjs → control-adapter-Co30P4lH-B5euUoQ4.mjs} +6 -6
- package/dist/{control-adapter-Co30P4lH-B8vk7fsI.mjs.map → control-adapter-Co30P4lH-B5euUoQ4.mjs.map} +1 -1
- package/dist/{control-policy-C16wMazs-O_wlPuFC.mjs → control-policy-bwcdB78Y-DgRaWAzu.mjs} +16 -22
- package/dist/control-policy-bwcdB78Y-DgRaWAzu.mjs.map +1 -0
- package/dist/{data-type-entries-C2zpNOAQ-BJh8QNDa.mjs → data-type-entries-DgKLUrqt-TKDikzti.mjs} +3 -3
- package/dist/{data-type-entries-C2zpNOAQ-BJh8QNDa.mjs.map → data-type-entries-DgKLUrqt-TKDikzti.mjs.map} +1 -1
- package/dist/{data-types-BRBW3ouc-ZtyZE7nE.mjs → data-types-k3Ebk3kj-DWk3nh_k.mjs} +3 -3
- package/dist/{data-types-BRBW3ouc-ZtyZE7nE.mjs.map → data-types-k3Ebk3kj-DWk3nh_k.mjs.map} +1 -1
- package/dist/{ddl-BzsT_-qY-Cdzm0YIK.mjs → ddl-C_vTj7b5-vyGLBKLo.mjs} +50 -5
- package/dist/ddl-C_vTj7b5-vyGLBKLo.mjs.map +1 -0
- package/dist/default-constraint-names-CtcRXhV8-nz3ff6b8.mjs +18 -0
- package/dist/default-constraint-names-CtcRXhV8-nz3ff6b8.mjs.map +1 -0
- package/dist/{descriptor-meta-ARufwwWW-DUiQQsOX.mjs → descriptor-meta-ARufwwWW-DMQsPNAl.mjs} +3 -3
- package/dist/{descriptor-meta-ARufwwWW-DUiQQsOX.mjs.map → descriptor-meta-ARufwwWW-DMQsPNAl.mjs.map} +1 -1
- package/dist/{descriptor-meta-Dp8tWKKU-5RiFTCA_.mjs → descriptor-meta-BgOMP4hF-CfUJsgjc.mjs} +8 -8
- package/dist/{descriptor-meta-Dp8tWKKU-5RiFTCA_.mjs.map → descriptor-meta-BgOMP4hF-CfUJsgjc.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-BycwK4wx-CuDo_Atu.mjs → descriptor-meta-runtime-CG2S236D-CUkzqeCr.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-BycwK4wx-CuDo_Atu.mjs.map → descriptor-meta-runtime-CG2S236D-CUkzqeCr.mjs.map} +1 -1
- package/dist/{diff-database-schema-DRPIV4Ae-BSY-cBm0.mjs → diff-database-schema-zc7d2uxC-BVe8D7vG.mjs} +5 -5
- package/dist/{diff-database-schema-DRPIV4Ae-BSY-cBm0.mjs.map → diff-database-schema-zc7d2uxC-BVe8D7vG.mjs.map} +1 -1
- package/dist/{full-text-index-expression-2O1p7zJA--CcXJUdq.mjs → full-text-index-expression-BpUM2Td6-2Q7y7DnO.mjs} +4 -4
- package/dist/{full-text-index-expression-2O1p7zJA--CcXJUdq.mjs.map → full-text-index-expression-BpUM2Td6-2Q7y7DnO.mjs.map} +1 -1
- package/dist/{infer-psl-contract-shHWsRbe-C65aVFOB.mjs → infer-psl-contract-B5yExD61-Cmye68li.mjs} +6 -6
- package/dist/{infer-psl-contract-shHWsRbe-C65aVFOB.mjs.map → infer-psl-contract-B5yExD61-Cmye68li.mjs.map} +1 -1
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{op-factory-call-B-4nf1jC-DkRw5e1q.mjs → op-factory-call-DdXVWQlV-DzfLhTkh.mjs} +70 -18
- package/dist/op-factory-call-DdXVWQlV-DzfLhTkh.mjs.map +1 -0
- package/dist/{planner-B5wkfdZ_-bckhSgt5.mjs → planner-ZmK0aNuY-Cak-8zwa.mjs} +16 -12
- package/dist/planner-ZmK0aNuY-Cak-8zwa.mjs.map +1 -0
- package/dist/{planner-ddl-builders-ClaAKDuZ-DpDBj2cs.mjs → planner-ddl-builders-DRProi99-D0K5ZiD0.mjs} +44 -14
- package/dist/planner-ddl-builders-DRProi99-D0K5ZiD0.mjs.map +1 -0
- package/dist/{planner-identity-values-BZpK0CdX-BJo672Ml.mjs → planner-identity-values-C1eV916m-D0p3EfYc.mjs} +3 -3
- package/dist/{planner-identity-values-BZpK0CdX-BJo672Ml.mjs.map → planner-identity-values-C1eV916m-D0p3EfYc.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-B3dM0fTf-XkTUm5wR.mjs → planner-produced-postgres-migration-BAWQ6iqr-C06XurYw.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-B3dM0fTf-XkTUm5wR.mjs.map → planner-produced-postgres-migration-BAWQ6iqr-C06XurYw.mjs.map} +1 -1
- package/dist/{planner-sql-checks-Bhp0Iq_X-DwwIxJHj.mjs → planner-sql-checks-rqOH8naU-B6xOE5lC.mjs} +4 -4
- package/dist/{planner-sql-checks-Bhp0Iq_X-DwwIxJHj.mjs.map → planner-sql-checks-rqOH8naU-B6xOE5lC.mjs.map} +1 -1
- package/dist/{postgres-contract-view-rT0ZLNqw-DThfALEV.mjs → postgres-contract-view-B0KloSYp-Cbbl_pIv.mjs} +6 -6
- package/dist/{postgres-contract-view-rT0ZLNqw-DThfALEV.mjs.map → postgres-contract-view-B0KloSYp-Cbbl_pIv.mjs.map} +1 -1
- package/dist/{postgres-migration-CmD95Eh_-DGLByWZD.mjs → postgres-migration-UVh2xeV0-DW8V_8aj.mjs} +84 -58
- package/dist/postgres-migration-UVh2xeV0-DW8V_8aj.mjs.map +1 -0
- package/dist/postgres-object-name-FPikIvOw-BNs44hTu.mjs +23 -0
- package/dist/postgres-object-name-FPikIvOw-BNs44hTu.mjs.map +1 -0
- package/dist/{postgres-schema-DXd0mebY-CExd_GcQ.mjs → postgres-schema-AlEVkXXS-ZfXWYddl.mjs} +3 -3
- package/dist/{postgres-schema-DXd0mebY-CExd_GcQ.mjs.map → postgres-schema-AlEVkXXS-ZfXWYddl.mjs.map} +1 -1
- package/dist/{prisma7-binding-DNckHEx8.d.mts → prisma7-binding-FvF1AZxQ.d.mts} +11 -1
- package/dist/prisma7-binding-FvF1AZxQ.d.mts.map +1 -0
- package/dist/{prisma7-binding-CArLf1qk.mjs → prisma7-binding-GebhdAGS.mjs} +11 -6
- package/dist/prisma7-binding-GebhdAGS.mjs.map +1 -0
- package/dist/{resolve-ddl-schema-CadTChyu-C7F31wpN.mjs → resolve-ddl-schema-BthOWVjF-DuZ9iUh-.mjs} +3 -3
- package/dist/{resolve-ddl-schema-CadTChyu-C7F31wpN.mjs.map → resolve-ddl-schema-BthOWVjF-DuZ9iUh-.mjs.map} +1 -1
- package/dist/{sql-renderer-DT4IEOVi-G0Q8NmyB.mjs → sql-renderer-DT4IEOVi-CE0YIu9V.mjs} +3 -3
- package/dist/{sql-renderer-DT4IEOVi-G0Q8NmyB.mjs.map → sql-renderer-DT4IEOVi-CE0YIu9V.mjs.map} +1 -1
- package/dist/{sql-utils-BMXJi06b-CAQOplfq.mjs → sql-utils-CVsvXiX4-C7xD0Bgv.mjs} +5 -9
- package/dist/sql-utils-CVsvXiX4-C7xD0Bgv.mjs.map +1 -0
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +25 -25
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__contract-free.d.mts +2 -2
- package/dist/target__contract-free.mjs +4 -4
- package/dist/target__control.mjs +3 -3
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.mjs +1 -1
- package/dist/target__planner-identity-values.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.mjs +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.mjs +2 -2
- package/package.json +9 -9
- package/dist/contract-free-DAGgx1J-.mjs.map +0 -1
- package/dist/contract-free-DlLLhKi4.d.mts.map +0 -1
- package/dist/control-policy-C16wMazs-O_wlPuFC.mjs.map +0 -1
- package/dist/ddl-BzsT_-qY-Cdzm0YIK.mjs.map +0 -1
- package/dist/op-factory-call-B-4nf1jC-DkRw5e1q.mjs.map +0 -1
- package/dist/planner-B5wkfdZ_-bckhSgt5.mjs.map +0 -1
- package/dist/planner-ddl-builders-ClaAKDuZ-DpDBj2cs.mjs.map +0 -1
- package/dist/postgres-migration-CmD95Eh_-DGLByWZD.mjs.map +0 -1
- package/dist/prisma7-binding-CArLf1qk.mjs.map +0 -1
- package/dist/prisma7-binding-DNckHEx8.d.mts.map +0 -1
- package/dist/sql-utils-BMXJi06b-CAQOplfq.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-hSJgX8qY-fZSDQFIE.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codecs-hSJgX8qY.mjs"],"sourcesContent":["import { A as PG_TIME_TEMPORAL_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, N as PG_UUID_CODEC_ID, O as PG_TIMETZ_CODEC_ID, P as PG_VARBIT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, i as PG_CHAR_CODEC_ID, j as PG_TSQUERY_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_ENUM_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID, y as PG_JSON_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { a as errorTemporalUnrepresentable, i as errorTemporalUnavailableForDefault, n as errorTemporalNonIsoCalendar, o as errorTemporalWrongType, r as errorTemporalUnavailable, s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { A as pgNumericRenderOutputType, C as pgIntervalEncodeJson, D as pgJsonbDecode, E as pgJsonEncode, M as renderLength, N as renderPrecision, O as pgJsonbEncode, S as pgIntervalDecodeJson, T as pgJsonDecode, _ as pgInt8NumberDecodeJson, a as decimalTextNumberLiteral, c as pgBigintEncode, d as pgByteaDecodeJson, f as pgByteaDecodeWire, g as pgInt8NumberDecode, h as pgInt8Decode, i as decimalTextBigintLiteral, j as pgUnboundedIntDecode, k as pgNumericDecode, l as pgBigintEncodeJson, m as pgFloatEncode, n as FLOAT4_MAX, o as fitsCharacterLength, p as pgByteaEncodeJson, r as canonicalUuid, s as fitsFloat4, t as CANONICAL_UUID, v as pgInt8NumberEncode, w as pgIntervalToIso, x as pgIntervalDecode, y as pgInt8NumberEncodeJson } from \"./codec-helpers-D015Pvwa.mjs\";\nimport { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from \"./data-types-BRBW3ouc.mjs\";\nimport { a as postgresCodec, r as definePostgresCodecs, t as PostgresCodecDescriptor } from \"./codec-descriptor-CZAGhM_O.mjs\";\nimport \"./namespace-ids-xtp_ZY86.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, OrExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlTextDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { canonicalDateTime } from \"@internal/sql-contract/data-type-support\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { CodecImpl, INT32_RANGE, INT64_RANGE, column, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, encodeJsonFloat, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { counted, withoutTrailing } from \"@internal/utils/text\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\n//#region src/core/require-temporal.ts\nlet fallback;\n/**\n* Sets the implementation `requireTemporal` returns when the runtime has no global `Temporal`.\n* The value is held once per process. Only the control entry calls this.\n*/\nfunction setFallbackTemporal(implementation) {\n\tfallback = implementation;\n}\n/**\n* The `Temporal` to use: the runtime's own when it has one, else the fallback. Throws\n* `RUNTIME.TEMPORAL_UNAVAILABLE` when there is neither.\n*/\nfunction requireTemporal(meta) {\n\tif (typeof Temporal !== \"undefined\") return Temporal;\n\tif (fallback !== void 0) return fallback;\n\tthrow \"generatorId\" in meta ? errorTemporalUnavailableForDefault(meta.generatorId) : errorTemporalUnavailable(meta.codecId, meta.operation);\n}\n//#endregion\n//#region src/core/temporal-codec-helpers.ts\nconst POSTGRES_TEMPORAL_SENTINELS = /* @__PURE__ */ new Set([\"infinity\", \"-infinity\"]);\nconst EXPANDED_YEAR_DIGITS = 6;\nconst ORDINARY_YEAR_DIGITS = 4;\nconst BC_SUFFIX = \" BC\";\nfunction adaptPostgresEra(text) {\n\tconst isBc = text.endsWith(BC_SUFFIX);\n\tconst body = isBc ? text.slice(0, -3) : text;\n\tconst yearEnd = body.indexOf(\"-\");\n\tif (yearEnd <= 0) return text;\n\tconst yearText = body.slice(0, yearEnd);\n\tif (!isBc && yearText.length <= ORDINARY_YEAR_DIGITS) return text;\n\tconst year = Number(yearText);\n\tif (!Number.isInteger(year)) return text;\n\tconst proleptic = isBc ? 1 - year : year;\n\treturn `${proleptic < 0 ? \"-\" : \"+\"}${String(Math.abs(proleptic)).padStart(EXPANDED_YEAR_DIGITS, \"0\")}${body.slice(yearEnd)}`;\n}\nfunction decodeTemporalText(identity, wire, parse, adapt) {\n\tconst temporal = requireTemporal({\n\t\tcodecId: identity.codecId,\n\t\toperation: \"decode\"\n\t});\n\tif (POSTGRES_TEMPORAL_SENTINELS.has(wire)) throw errorTemporalUnrepresentable({\n\t\t...identity,\n\t\toperation: \"decode\",\n\t\tvalue: wire,\n\t\tdetail: `PostgreSQL's ${wire} is a sentinel with no position on the timeline, so no Temporal value denotes it`\n\t});\n\ttry {\n\t\treturn parse(temporal, adapt(wire));\n\t} catch (cause) {\n\t\tthrow errorTemporalUnrepresentable({\n\t\t\t...identity,\n\t\t\toperation: \"decode\",\n\t\t\tvalue: wire,\n\t\t\tdetail: cause instanceof Error ? cause.message : String(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\nfunction encodeTemporalValue(identity, value) {\n\tconst tag = typeof value === \"object\" && value !== null ? Reflect.get(value, Symbol.toStringTag) : void 0;\n\tif (tag !== identity.temporalTag) throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, describeEncodeInput(value, tag));\n\tif (value.calendarId !== void 0 && value.calendarId !== \"iso8601\") throw errorTemporalNonIsoCalendar(identity.codecId, value.calendarId);\n\treturn value.toString();\n}\nfunction describeEncodeInput(value, tag) {\n\tif (typeof tag === \"string\") return `a ${tag}`;\n\tif (value instanceof Date) return \"a Date\";\n\tif (value === null) return \"null\";\n\treturn `a ${typeof value}`;\n}\nconst DATE_TEMPORAL = {\n\tcodecId: PG_DATE_TEMPORAL_CODEC_ID,\n\tstringType: \"DateString\",\n\ttemporalTag: \"Temporal.PlainDate\"\n};\nconst TIMESTAMP_TEMPORAL = {\n\tcodecId: PG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\tstringType: \"TimestampString(p)\",\n\ttemporalTag: \"Temporal.PlainDateTime\"\n};\nconst TIMESTAMPTZ_TEMPORAL = {\n\tcodecId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\tstringType: \"TimestamptzString(p)\",\n\ttemporalTag: \"Temporal.Instant\"\n};\nconst TIME_TEMPORAL = {\n\tcodecId: PG_TIME_TEMPORAL_CODEC_ID,\n\tstringType: \"TimeString(p)\",\n\ttemporalTag: \"Temporal.PlainTime\"\n};\nconst unadapted = (text) => text;\nconst pgDateTemporalDecode = (wire) => decodeTemporalText(DATE_TEMPORAL, wire, (temporal, text) => temporal.PlainDate.from(text), adaptPostgresEra);\nconst pgDateTemporalEncode = (value) => encodeTemporalValue(DATE_TEMPORAL, value);\nconst pgTimestampTemporalDecode = (wire) => decodeTemporalText(TIMESTAMP_TEMPORAL, wire, (temporal, text) => temporal.PlainDateTime.from(text), adaptPostgresEra);\nconst pgTimestampTemporalEncode = (value) => encodeTemporalValue(TIMESTAMP_TEMPORAL, value);\nconst pgTimestamptzTemporalDecode = (wire) => decodeTemporalText(TIMESTAMPTZ_TEMPORAL, wire, (temporal, text) => temporal.Instant.from(text), adaptPostgresEra);\nconst pgTimestamptzTemporalEncode = (value) => encodeTemporalValue(TIMESTAMPTZ_TEMPORAL, value);\nconst pgTimeTemporalDecode = (wire) => decodeTemporalText(TIME_TEMPORAL, wire, (temporal, text) => temporal.PlainTime.from(text), unadapted);\nconst pgTimeTemporalEncode = (value) => encodeTemporalValue(TIME_TEMPORAL, value);\nconst EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS = (/* @__PURE__ */ new Date(\"-004713-11-24T00:00:00Z\")).getTime();\nfunction utcText(value, codecId, zone) {\n\tconst milliseconds = value.getTime();\n\tif (!Number.isFinite(milliseconds) || milliseconds < EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS) throw new RangeError(`${codecId} writes a Date as UTC text and needs a valid Date on or after 4714-11-24 BC, the earliest timestamp PostgreSQL holds; got ${String(value)}`);\n\tconst year = value.getUTCFullYear();\n\tconst iso = value.toISOString();\n\tconst monthOnward = iso.slice(iso.indexOf(\"-\", 1), -1);\n\treturn `${String(year <= 0 ? 1 - year : year).padStart(ORDINARY_YEAR_DIGITS, \"0\")}${monthOnward}${zone}${year <= 0 ? BC_SUFFIX : \"\"}`;\n}\nconst utcTimestampText = (value, codecId) => utcText(value, codecId, \"\");\nconst utcTimestamptzText = (value, codecId) => utcText(value, codecId, \"Z\");\n//#endregion\n//#region src/core/date-codecs.ts\nconst TIMESTAMPTZ_TEXT = /^([+-]\\d{6}|\\d{4,6})-(\\d{2})-(\\d{2})[ T](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,6}))?(?:Z|([+-])(\\d{2})(?::?(\\d{2}))?(?::?(\\d{2}))?)( BC)?$/;\nfunction invalidDate() {\n\treturn /* @__PURE__ */ new RangeError(`${PG_TIMESTAMPTZ_DATE_CODEC_ID} requires a valid Date or a representable ISO PostgreSQL timestamp with time zone; use TimestamptzString for unsupported values`);\n}\nfunction isRepresentable(value) {\n\treturn value instanceof Date && Number.isFinite(value.getTime()) && value.getTime() >= EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS;\n}\nfunction validateDate(value) {\n\tif (!isRepresentable(value)) throw invalidDate();\n\treturn value;\n}\nfunction decodeDate(wire) {\n\tconst date = typeof wire === \"string\" ? parseDate(wire) : void 0;\n\tif (date === void 0) throw invalidDate();\n\treturn date;\n}\n/** The instant a timestamp with time zone as PostgreSQL writes it names, or `undefined` when the text is not one. */\nfunction parseDate(text) {\n\tconst match = TIMESTAMPTZ_TEXT.exec(text);\n\tif (!match) return void 0;\n\tconst [, yearText = \"\", monthText, dayText, hourText, minuteText, secondText, fraction = \"\", sign, offsetHour = \"0\", offsetMinute = \"0\", offsetSecond = \"0\", era] = match;\n\tconst year = era ? 1 - Number(yearText) : Number(yearText);\n\tconst month = Number(monthText) - 1;\n\tconst day = Number(dayText);\n\tconst hour = Number(hourText);\n\tconst minute = Number(minuteText);\n\tconst second = Number(secondText);\n\tconst milliseconds = Number(fraction.slice(0, 3).padEnd(3, \"0\"));\n\tconst cycles = Math.floor((year - 2e3) / 400);\n\tconst safeYear = year - cycles * 400;\n\tconst local = /* @__PURE__ */ new Date(0);\n\tlocal.setUTCFullYear(safeYear, month, day);\n\tlocal.setUTCHours(hour, minute, second, milliseconds);\n\tif (era !== void 0 && (Number(yearText) === 0 || /^[+-]/.test(yearText)) || local.getUTCFullYear() !== safeYear || local.getUTCMonth() !== month || local.getUTCDate() !== day || local.getUTCHours() !== hour || local.getUTCMinutes() !== minute || local.getUTCSeconds() !== second || Number(offsetHour) > 15 || Number(offsetMinute) > 59 || Number(offsetSecond) > 59) return void 0;\n\tconst offset = (Number(offsetHour) * 3600 + Number(offsetMinute) * 60 + Number(offsetSecond)) * (sign === \"-\" ? -1 : 1);\n\tconst value = /* @__PURE__ */ new Date(local.getTime() - offset * 1e3 + cycles * 146097 * 864e5);\n\treturn isRepresentable(value) ? value : void 0;\n}\nfunction encodeDate(value) {\n\treturn utcTimestamptzText(validateDate(value), PG_TIMESTAMPTZ_DATE_CODEC_ID);\n}\nvar PgTimestamptzDateCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn encodeDate(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodeDate(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestamptzCanonical(validateDate(value).toISOString());\n\t}\n\tdecodeJson(json) {\n\t\treturn parseDate(decodeJsonString(\"pg/timestamptz-date@1\", json)) ?? refuseJsonValue(\"pg/timestamptz-date@1\", \"a timestamp with time zone as PostgreSQL writes it\", json);\n\t}\n};\nvar PgTimestamptzDateDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamptz.id;\n\tcodecId = PG_TIMESTAMPTZ_DATE_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(_params) {\n\t\treturn \"Date\";\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimestamptzDateCodec(this);\n\t}\n};\nconst pgTimestamptzDateDescriptor = new PgTimestamptzDateDescriptor();\nconst pgTimestamptzDateColumn = (params = {}) => column(pgTimestamptzDateDescriptor.factory(params), pgTimestamptzDateDescriptor.codecId, params);\n//#endregion\n//#region src/core/date-time-stored-text.ts\nconst YEAR = String.raw`(?:[+-]\\d{6}|\\d{4,7})`;\nconst DATE = String.raw`${YEAR}-\\d{2}-\\d{2}`;\nconst TIME = String.raw`\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?`;\nconst OFFSET = String.raw`(?:Z|[+-]\\d{2}(?::\\d{2}(?::\\d{2})?)?)`;\nconst INFINITY = \"infinity|-infinity|\";\nconst BC = \"(?: BC)?\";\nconst FORMS = {\n\tdate: `${DATE}${BC}`,\n\ttime: TIME,\n\ttimeWithOffset: `${TIME}${OFFSET}`,\n\tdateTime: `${DATE}[ T]${TIME}${BC}`,\n\tinstant: `${DATE}[ T]${TIME}${OFFSET}${BC}`\n};\nconst DATED = /^([+-]?)(\\d{4,7})(-.*?)( BC)?$/;\nconst END_OF_DAY = /^24:00:00(?:\\.0+)?(?![.\\d])/;\n/** PostgreSQL's largest UTC offset, which it writes for no type past 15:59:59. */\nconst MAX_OFFSET_HOURS = 15;\nfunction storedText(options) {\n\treturn {\n\t\tdataType: options.dataType,\n\t\tshape: options.shape,\n\t\tpattern: new RegExp(`^(?:${options.infinity ? INFINITY : \"\"}${FORMS[options.shape]})$`),\n\t\tdescription: `${options.description} in ISO 8601 or as PostgreSQL writes it`,\n\t\tendOfDay: options.endOfDay\n\t};\n}\nconst pgDateStoredText = storedText({\n\tdataType: pgDate.id,\n\tshape: \"date\",\n\tdescription: \"a date\",\n\tinfinity: true,\n\tendOfDay: false\n});\nconst pgTimeStoredText = storedText({\n\tdataType: pgTime.id,\n\tshape: \"time\",\n\tdescription: \"a time of day\",\n\tinfinity: false,\n\tendOfDay: true\n});\nconst pgTimetzStoredText = storedText({\n\tdataType: pgTimetz.id,\n\tshape: \"timeWithOffset\",\n\tdescription: \"a time of day with a UTC offset\",\n\tinfinity: false,\n\tendOfDay: true\n});\nconst pgTimestampStoredText = storedText({\n\tdataType: pgTimestamp.id,\n\tshape: \"dateTime\",\n\tdescription: \"a date and time of day\",\n\tinfinity: true,\n\tendOfDay: false\n});\nconst pgTimestamptzStoredText = storedText({\n\tdataType: pgTimestamptz.id,\n\tshape: \"instant\",\n\tdescription: \"a date and time of day with a UTC offset\",\n\tinfinity: true,\n\tendOfDay: false\n});\n/** The text with its year moved into the 400-year cycle from 2000, or `undefined` for a year no calendar has. */\nfunction inGregorianCycle(text) {\n\tconst match = DATED.exec(text);\n\tif (match === null) return text;\n\tconst [, sign = \"\", digits = \"\", rest = \"\", bc] = match;\n\tconst year = Number(digits);\n\tif (bc !== void 0 && (sign !== \"\" || year === 0) || sign === \"-\" && year === 0) return;\n\treturn `${2e3 + ((bc !== void 0 ? 1 - year : sign === \"-\" ? -year : year) % 400 + 400) % 400}${rest}`;\n}\nfunction holdsValue(stored, text) {\n\tif (text === \"infinity\" || text === \"-infinity\") return true;\n\tconst cycled = inGregorianCycle(text);\n\tif (cycled === void 0) return false;\n\tconst read = stored.endOfDay ? cycled.replace(END_OF_DAY, \"00:00:00\") : cycled;\n\ttry {\n\t\tcanonicalDateTime(read, {\n\t\t\tshape: stored.shape,\n\t\t\townerId: stored.dataType,\n\t\t\tmaxOffsetHours: MAX_OFFSET_HOURS\n\t\t});\n\t\treturn true;\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.CAST_REFUSED\") return false;\n\t\tthrow error;\n\t}\n}\n/** Reads a stored date or time text, refusing text in another form or naming no real date and time. */\nfunction decodeJsonDateTimeText(codecId, json, stored) {\n\tconst text = decodeJsonMatching(codecId, json, stored.pattern, stored.description);\n\treturn holdsValue(stored, text) ? text : refuseJsonValue(codecId, stored.description, json);\n}\n//#endregion\n//#region src/core/temporal-codecs.ts\nvar PgDateTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgDateTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgDateTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgDateCanonical(pgDateTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgDateTemporalDecode(decodeJsonString(PG_DATE_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgDateTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgDate.id;\n\tcodecId = PG_DATE_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgDateTemporalCodec(this);\n\t}\n};\nconst pgDateTemporalDescriptor = new PgDateTemporalDescriptor();\nvar PgTimestampTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgTimestampTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgTimestampTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestampCanonical(pgTimestampTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgTimestampTemporalDecode(decodeJsonString(PG_TIMESTAMP_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgTimestampTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamp.id;\n\tcodecId = PG_TIMESTAMP_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\tfactory(_params) {\n\t\treturn () => new PgTimestampTemporalCodec(this);\n\t}\n};\nconst pgTimestampTemporalDescriptor = new PgTimestampTemporalDescriptor();\nvar PgTimestamptzTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgTimestamptzTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgTimestamptzTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestamptzCanonical(pgTimestamptzTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgTimestamptzTemporalDecode(decodeJsonString(PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgTimestamptzTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamptz.id;\n\tcodecId = PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\tfactory(_params) {\n\t\treturn () => new PgTimestamptzTemporalCodec(this);\n\t}\n};\nconst pgTimestamptzTemporalDescriptor = new PgTimestamptzTemporalDescriptor();\nvar PgTimeTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgTimeTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgTimeTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimeCanonical(pgTimeTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgTimeTemporalDecode(decodeJsonString(PG_TIME_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgTimeTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTime.id;\n\tcodecId = PG_TIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\tfactory(_params) {\n\t\treturn () => new PgTimeTemporalCodec(this);\n\t}\n};\nconst pgTimeTemporalDescriptor = new PgTimeTemporalDescriptor();\n//#endregion\n//#region src/core/temporal-string-codecs.ts\nvar PgDateStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgDateCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_DATE_STRING_CODEC_ID, json, pgDateStoredText);\n\t}\n};\nvar PgDateStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgDate.id;\n\tcodecId = PG_DATE_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgDateStringCodec(this);\n\t}\n};\nconst pgDateStringDescriptor = new PgDateStringDescriptor();\nvar PgTimestampStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value instanceof Date ? utcTimestampText(value, this.id) : value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestampCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIMESTAMP_STRING_CODEC_ID, json, pgTimestampStoredText);\n\t}\n};\nvar PgTimestampStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamp.id;\n\tcodecId = PG_TIMESTAMP_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"TimestampString\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimestampStringCodec(this);\n\t}\n};\nconst pgTimestampStringDescriptor = new PgTimestampStringDescriptor();\nvar PgTimestamptzStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value instanceof Date ? utcTimestamptzText(value, this.id) : value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestamptzCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIMESTAMPTZ_STRING_CODEC_ID, json, pgTimestamptzStoredText);\n\t}\n};\nvar PgTimestamptzStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamptz.id;\n\tcodecId = PG_TIMESTAMPTZ_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"TimestamptzString\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimestamptzStringCodec(this);\n\t}\n};\nconst pgTimestamptzStringDescriptor = new PgTimestamptzStringDescriptor();\nvar PgTimeStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimeCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIME_STRING_CODEC_ID, json, pgTimeStoredText);\n\t}\n};\nvar PgTimeStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTime.id;\n\tcodecId = PG_TIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"TimeString\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimeStringCodec(this);\n\t}\n};\nconst pgTimeStringDescriptor = new PgTimeStringDescriptor();\n//#endregion\n//#region src/core/codecs.ts\n/**\n* Projects the expression unchanged, for codecs whose canonical JSON is what\n* PostgreSQL's own JSON conversion already produces.\n*\n* Identity here is a claim about the target's behaviour, not an absence of one:\n* the codec's conformance cases are what test it, including at the boundaries\n* of the representation — escaping, sign, and range — where a native conversion\n* would be most likely to diverge.\n*/\n/**\n* Whether a string is numeric text in the form PostgreSQL *prints*, which is\n* narrower than the form it accepts.\n*\n* `numeric` reads `+123`, `.5`, `1.`, `1e5`, `0x1f`, `1_000` and whitespace-padded\n* input, but prints every one of them in a single normalised form — `123`,\n* `0.5`, `1`, `100000`, `31`, `1000`, `12`. The projection reads the column back\n* through that printing, so accepting an input spelling here would produce an\n* application value the projection can never return: `encodeJson('1e5')` would\n* claim `1e5` where the database yields `100000`.\n*\n* `NaN`, `Infinity` and `-Infinity` are genuine `numeric` values, not error\n* states, and PostgreSQL emits them into JSON as strings — so they belong to the\n* canonical form and round-trip like any other value.\n*/\nconst CANONICAL_NUMERIC_TEXT = /^(?:-?\\d+(?:\\.\\d+)?|NaN|-?Infinity)$/;\nconst isCanonicalNumericText = (value) => CANONICAL_NUMERIC_TEXT.test(value);\n/**\n* Whether canonical numeric text is a value `numeric(precision, scale)` stores without rounding: a whole number of units of 10^-scale, and at most `precision` digits once counted in those units. A negative scale rounds to tens, hundreds and so on, and a scale above the precision allows only values below 1. NaN fits; an infinity does not.\n*/\nfunction fitsNumeric(text, precision, scale) {\n\tif (text === \"NaN\") return true;\n\tif (text.endsWith(\"Infinity\")) return false;\n\tconst [whole = \"\", fraction = \"\"] = text.replace(/^-/, \"\").split(\".\");\n\tconst significantFraction = withoutTrailing(fraction, \"0\");\n\tconst digits = `${whole}${significantFraction}`.replace(/^0+/, \"\");\n\tif (digits === \"\") return true;\n\tconst shift = scale - significantFraction.length;\n\tif (shift >= 0) return digits.length + shift <= precision;\n\tconst units = withoutTrailing(digits, \"0\");\n\tif (digits.length - units.length < -shift) return false;\n\treturn digits.length + shift <= precision;\n}\nconst identityJsonProjection = (expression) => expression;\n/**\n* Projects a `character` value as text, which drops the trailing spaces that pad it to its length and nothing else, so an include reads the value a flat read's `decode` returns.\n*/\nconst unpaddedCharJsonProjection = (expression) => CastExpr.as(expression, \"text\");\nconst BIT_STRING = /^[01]*$/;\nconst decodePostgresNumberWire = (wire) => typeof wire === \"string\" ? Number(wire) : wire;\nconst decodePostgresBooleanWire = (wire) => {\n\tif (typeof wire === \"boolean\") return wire;\n\tif (wire === \"t\" || wire === \"true\") return true;\n\tif (wire === \"f\" || wire === \"false\") return false;\n\tthrow postgresError(\"RUNTIME.DECODE_FAILED\", \"pg/bool@1 wire value must be boolean text\", { meta: {\n\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\treceived: wire\n\t} });\n};\n/**\n* Projects a numeric-valued expression as decimal text.\n*\n* The cast is part of the projected expression, which is what makes it correct:\n* whatever `jsonProjection` returns is the argument the JSON constructor\n* receives, so casting here happens *before* PostgreSQL builds the JSON value.\n* Handed a `numeric` or `int8` directly, the constructor emits a JSON **number**,\n* and every digit past IEEE-754's 53 bits of significand is gone by the time the\n* driver has parsed it — before any codec can intervene. A cast applied to the\n* constructor's result instead of its argument would be too late to matter.\n*/\nconst decimalTextJsonProjection = (expression) => CastExpr.as(expression, \"text\");\n/**\n* Projects a `bytea` as base64 text.\n*\n* Like the decimal-text cast, the encoding is part of the projected expression:\n* PostgreSQL's own JSON conversion of a `bytea` emits its `\\x`-prefixed hex\n* output form, so the base64 encoding has to replace that conversion rather\n* than post-process it.\n*\n* `encode` emits RFC 2045 base64, which carries a line break every 76\n* characters — so any value over 56 bytes arrives wrapped. The breaks are\n* removed here, because the canonical form is unwrapped base64 and\n* `decodeJson` rejects anything else. `chr(10)` rather than a newline literal\n* keeps the rendered SQL on one line.\n*/\nconst base64JsonProjection = (expression) => FunctionCallExpr.of(\"translate\", [\n\tFunctionCallExpr.of(\"encode\", [expression, LiteralExpr.of(\"base64\")]),\n\tFunctionCallExpr.of(\"chr\", [LiteralExpr.of(10)]),\n\tLiteralExpr.of(\"\")\n]);\nconst datePart = (field, expression) => FunctionCallExpr.of(\"date_part\", [LiteralExpr.of(field), expression]);\nconst whenNonZero = (value, rendered) => CaseExpr.of([{\n\tcondition: BinaryExpr.neq(value, LiteralExpr.of(0)),\n\tvalue: rendered\n}], LiteralExpr.of(null));\n/**\n* Projects an `interval` as an ISO-8601 duration.\n*\n* An interval carries months, days and microseconds independently — `P1M` and\n* `P30D` are different intervals — so the projection reads each field with\n* `date_part` and assembles them rather than reducing the value to an epoch,\n* which would have to choose a length for a month. `IntervalStyle` decides how\n* PostgreSQL spells an interval and cannot be bound per expression, so the\n* spelling is constructed here instead of inherited.\n*\n* `concat` drops NULL arguments, so a zero component is omitted by rendering as\n* NULL; the seconds field is taken through `numeric` because a `double\n* precision` microsecond renders in scientific notation.\n*\n* That same NULL-dropping is why the whole assembly sits under an explicit NULL\n* check: for a NULL interval every field is NULL, `concat` yields `'P'`, and the\n* zero-duration fallback below would report an absent value as a zero one.\n*/\nconst isoDurationJsonProjection = (expression) => {\n\tconst field = (name) => datePart(name, expression);\n\tconst seconds = CastExpr.as(field(\"second\"), \"numeric\");\n\tconst assembled = FunctionCallExpr.of(\"concat\", [\n\t\tLiteralExpr.of(\"P\"),\n\t\twhenNonZero(field(\"year\"), FunctionCallExpr.of(\"concat\", [field(\"year\"), LiteralExpr.of(\"Y\")])),\n\t\twhenNonZero(field(\"month\"), FunctionCallExpr.of(\"concat\", [field(\"month\"), LiteralExpr.of(\"M\")])),\n\t\twhenNonZero(field(\"day\"), FunctionCallExpr.of(\"concat\", [field(\"day\"), LiteralExpr.of(\"D\")])),\n\t\tCaseExpr.of([{\n\t\t\tcondition: OrExpr.of([\n\t\t\t\tBinaryExpr.neq(field(\"hour\"), LiteralExpr.of(0)),\n\t\t\t\tBinaryExpr.neq(field(\"minute\"), LiteralExpr.of(0)),\n\t\t\t\tBinaryExpr.neq(field(\"second\"), LiteralExpr.of(0))\n\t\t\t]),\n\t\t\tvalue: LiteralExpr.of(\"T\")\n\t\t}], LiteralExpr.of(null)),\n\t\twhenNonZero(field(\"hour\"), FunctionCallExpr.of(\"concat\", [field(\"hour\"), LiteralExpr.of(\"H\")])),\n\t\twhenNonZero(field(\"minute\"), FunctionCallExpr.of(\"concat\", [field(\"minute\"), LiteralExpr.of(\"M\")])),\n\t\twhenNonZero(field(\"second\"), FunctionCallExpr.of(\"concat\", [seconds, LiteralExpr.of(\"S\")]))\n\t]);\n\treturn CaseExpr.of([{\n\t\tcondition: NullCheckExpr.isNull(expression),\n\t\tvalue: LiteralExpr.of(null)\n\t}], FunctionCallExpr.of(\"coalesce\", [FunctionCallExpr.of(\"nullif\", [assembled, LiteralExpr.of(\"P\")]), LiteralExpr.of(\"PT0S\")]));\n};\nconst postgresSqlCharDescriptor = postgresCodec(sqlCharDescriptor, {\n\tdataType: pgChar,\n\tjsonProjection: unpaddedCharJsonProjection,\n\tfactory: (descriptor, params) => () => new PgCharCodec(descriptor, params.length)\n});\nconst postgresSqlVarcharDescriptor = postgresCodec(sqlVarcharDescriptor, {\n\tdataType: pgVarchar,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, params) => () => new PgVarcharCodec(descriptor, params.length)\n});\nconst postgresSqlIntDescriptor = postgresCodec(sqlIntDescriptor, {\n\tdataType: pgInt4,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor) => () => new PgIntCodec(descriptor)\n});\nconst postgresSqlFloatDescriptor = postgresCodec(sqlFloatDescriptor, {\n\tdataType: pgFloat8,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor) => () => new PgFloatCodec(descriptor)\n});\nconst postgresSqlTextDescriptor = postgresCodec(sqlTextDescriptor, {\n\tdataType: pgText,\n\tjsonProjection: identityJsonProjection\n});\nvar PgTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(PG_TEXT_CODEC_ID, json);\n\t}\n};\nvar PgTextDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgText.id;\n\tcodecId = PG_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgTextCodec(this);\n\t}\n};\nconst pgTextDescriptor = new PgTextDescriptor();\nconst pgTextColumn = () => column(pgTextDescriptor.factory(), pgTextDescriptor.codecId, void 0);\n/**\n* Codec for a `pg.enum(Ref)` column bound to a native Postgres enum type.\n* Text passthrough, identical to `pg/text@1` — encode/decode do not carry the\n* enum's member values; membership is enforced by the native type itself, not\n* by this codec. `renderValueLiteral` renders a member value as its TS\n* literal, which is what drives the column's typed value-union (via\n* `renderValueSetType` reading the column's `valueSet` ref) — the codec\n* itself carries no params of its own; typing comes entirely from the\n* column's value-set, not from `pg/enum@1`.\n*\n* A distinct codec id (rather than reusing `pg/text@1` on a plain text\n* column) keeps native-enum columns independently identifiable — from a\n* column's `codecId` alone, without also inspecting its data type — which\n* the managed (DDL) phase needs to target `CREATE TYPE`/`ALTER TYPE`\n* operations at exactly the columns that use one.\n*\n* Not `textual`, although its values are strings: Postgres has no `LIKE`,\n* `ILIKE` or `to_tsvector` over an enum type.\n*/\nvar PgEnumCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(PG_ENUM_CODEC_ID, json);\n\t}\n};\n/**\n* Narrows codec `typeParams` to {@link PgEnumParams} — the shape that binds a\n* column to a named database type (a native enum's `CREATE TYPE` name).\n*/\nfunction isPgEnumParams(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && \"typeName\" in value && typeof value.typeName === \"string\";\n}\nvar PgEnumDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgEnum.id;\n\tcodecId = PG_ENUM_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgEnumParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgEnumCodec(this);\n\t}\n\t/**\n\t* Authoring-time hook a `pg.enum(<ref>)` type constructor calls once it has\n\t* resolved its ref argument to the referenced `native_enum` entity:\n\t* produces this codec's per-column `typeParams` from the entity's bare type\n\t* name. Schema-qualification (`auth.aal_level` for a\n\t* named non-default schema) is not this hook's concern — the field's\n\t* namespace isn't known at this call site for every authoring path (the TS\n\t* builder resolves a column before it knows its model's namespace), so it is\n\t* applied later, at contract construction, by {@link qualifyNativeType} via\n\t* the target's `authoring.qualifyColumnType` hook. Returns `undefined` if `entity` is not a `PostgresNativeEnum` (a\n\t* contributor bug, not a user-schema error — the caller decides how to\n\t* report it).\n\t*/\n\tcolumnFromEntity(entity) {\n\t\tif (!PostgresNativeEnum.is(entity)) return void 0;\n\t\treturn { typeParams: { typeName: entity.typeName } };\n\t}\n\t/**\n\t* Schema-qualifies this native enum type's name for the namespace the\n\t* consuming column lives in: `${namespaceId}.${typeName}` for a named\n\t* non-default schema, bare for the target's default schema (`public`) or\n\t* the late-bound unbound sentinel (whose schema `search_path` resolves at\n\t* runtime). Postgres's `format_type()` reports the bare name for a\n\t* public-schema type, so a public column's declared native type must stay\n\t* bare to match. Owned here because the codec owns its native type.\n\t*/\n\tqualifyNativeType(typeName, namespaceId) {\n\t\treturn namespaceId === \"public\" || namespaceId === UNBOUND_NAMESPACE_ID ? typeName : `${namespaceId}.${typeName}`;\n\t}\n};\nconst pgEnumDescriptor = new PgEnumDescriptor();\n/**\n* Contract-construction-time column-type qualifier the Postgres target\n* contributes through `authoring.qualifyColumnType`.\n* `buildSqlContractFromDefinition` calls this for every column as it is\n* constructed, passing the column's bare type info and its owning\n* `namespaceId`; a native-enum column (`pg/enum@1`) gets its type name\n* schema-qualified for that namespace (via\n* {@link PgEnumDescriptor.qualifyNativeType}), which rewrites only\n* `typeParams.typeName`. Every other codec passes through unchanged.\n* Both the PSL `pg.enum(Ref)` path and the TS `pg.enum(handle)` path route\n* through here — the dispatch keys off the codec id, not authoring surface.\n*/\nfunction postgresQualifyColumnType(input, namespaceId) {\n\tif (input.codecId !== \"pg/enum@1\") return input;\n\tconst bareTypeName = input.typeParams?.[\"typeName\"];\n\tif (typeof bareTypeName !== \"string\") return input;\n\tconst qualified = pgEnumDescriptor.qualifyNativeType(bareTypeName, namespaceId);\n\treturn { typeParams: {\n\t\t...input.typeParams,\n\t\ttypeName: qualified\n\t} };\n}\n/**\n* Postgres `text[]` control codec. Encode is an identity pass-through: the pg\n* wire driver serialises a JS `string[]` to a Postgres array literal under the\n* `$N::text[]` cast emitted from this codec's native type. Control-plane reads\n* that need semantic arrays parse raw array text before shared validation rather\n* than decoding this whole array value. Not a user-facing scalar — it is not\n* part of the authorable `CodecTypes` surface, only the runtime codec registry.\n*/\nvar PgTextArrayCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn [...value];\n\t}\n\t/** A `text[]` may hold NULL elements, which PostgreSQL writes as JSON `null`. */\n\tdecodeJson(json) {\n\t\tconst expected = \"an array of strings and nulls\";\n\t\tif (!Array.isArray(json)) return refuseJsonValue(PG_TEXT_ARRAY_CODEC_ID, expected, json);\n\t\tconst elements = [];\n\t\tfor (const entry of json) {\n\t\t\tif (entry !== null && typeof entry !== \"string\") return refuseJsonValue(PG_TEXT_ARRAY_CODEC_ID, expected, entry);\n\t\t\telements.push(entry);\n\t\t}\n\t\treturn elements;\n\t}\n};\nvar PgTextArrayDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgTextArray.id;\n\tcodecId = PG_TEXT_ARRAY_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgTextArrayCodec(this);\n\t}\n};\nconst pgTextArrayDescriptor = new PgTextArrayDescriptor();\nvar PgInt4Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(PG_INT4_CODEC_ID, json, INT32_RANGE);\n\t}\n};\nvar PgInt4Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInt4.id;\n\tcodecId = PG_INT4_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt4Codec(this);\n\t}\n};\nconst pgInt4Descriptor = new PgInt4Descriptor();\nconst pgInt4Column = () => column(pgInt4Descriptor.factory(), pgInt4Descriptor.codecId, void 0);\nvar PgInt2Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(PG_INT2_CODEC_ID, json, {\n\t\t\tmin: -32768,\n\t\t\tmax: 32767\n\t\t});\n\t}\n};\nvar PgInt2Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInt2.id;\n\tcodecId = PG_INT2_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt2Codec(this);\n\t}\n};\nconst pgInt2Descriptor = new PgInt2Descriptor();\nconst pgInt2Column = () => column(pgInt2Descriptor.factory(), pgInt2Descriptor.codecId, void 0);\n/**\n* A Postgres `int8` spans the full signed 64-bit range, which a JS `number`\n* cannot hold past 2^53. Application values are `bigint` and the canonical JSON\n* is decimal text; the wire form is the decimal string `pg` reads and writes for\n* this type.\n*/\nvar PgInt8Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgBigintEncode(PG_INT8_CODEC_ID, value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgInt8Decode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgBigintEncodeJson(PG_INT8_CODEC_ID, value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonIntegerText(PG_INT8_CODEC_ID, json, INT64_RANGE);\n\t}\n};\nvar PgInt8Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgInt8.id;\n\tcodecId = PG_INT8_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt8Codec(this);\n\t}\n};\nconst pgInt8Descriptor = new PgInt8Descriptor();\nconst pgInt8Column = () => column(pgInt8Descriptor.factory(), pgInt8Descriptor.codecId, void 0);\n/**\n* A Postgres `int8` decoded as a JS `number`, for columns whose values stay\n* within the safe integer range ±(2^53 − 1). Both directions guard rather than\n* round: decode (wire and JSON) and encode throw a structured error on\n* out-of-range or non-integral input. The canonical JSON is the decimal text\n* `pg/int8` carries, which every codec of that data type shares. The descriptor\n* claims no target type, so `int8` in type position stays `pg/int8@1`.\n*/\nvar PgInt8NumberCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgInt8NumberEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgInt8NumberDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgInt8NumberEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn pgInt8NumberDecodeJson(json);\n\t}\n};\nvar PgInt8NumberDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgInt8.id;\n\tcodecId = PG_INT8_NUMBER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt8NumberCodec(this);\n\t}\n};\nconst pgInt8NumberDescriptor = new PgInt8NumberDescriptor();\nconst pgInt8NumberColumn = () => column(pgInt8NumberDescriptor.factory(), pgInt8NumberDescriptor.codecId, void 0);\nvar PgFloat4Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgFloatEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn encodeJsonFloat(value);\n\t}\n\tdecodeJson(json) {\n\t\tconst value = decodeJsonFloat(PG_FLOAT4_CODEC_ID, json);\n\t\tif (Number.isFinite(value) && !fitsFloat4(value)) return refuseJsonValue(PG_FLOAT4_CODEC_ID, `a number float4 holds, at most ${FLOAT4_MAX} in magnitude and not so small that it becomes 0, or the text NaN, Infinity or -Infinity`, json);\n\t\treturn value;\n\t}\n};\nvar PgFloat4Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgFloat4.id;\n\tcodecId = PG_FLOAT4_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgFloat4Codec(this);\n\t}\n};\nconst pgFloat4Descriptor = new PgFloat4Descriptor();\nconst pgFloat4Column = () => column(pgFloat4Descriptor.factory(), pgFloat4Descriptor.codecId, void 0);\nvar PgFloat8Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgFloatEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn encodeJsonFloat(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonFloat(PG_FLOAT8_CODEC_ID, json);\n\t}\n};\nvar PgFloat8Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgFloat8.id;\n\tcodecId = PG_FLOAT8_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgFloat8Codec(this);\n\t}\n};\nconst pgFloat8Descriptor = new PgFloat8Descriptor();\nconst pgFloat8Column = () => column(pgFloat8Descriptor.factory(), pgFloat8Descriptor.codecId, void 0);\nvar PgBoolCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresBooleanWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonBoolean(PG_BOOL_CODEC_ID, json);\n\t}\n};\nvar PgBoolDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgBool.id;\n\tcodecId = PG_BOOL_CODEC_ID;\n\ttraits = [\"equality\", \"boolean\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgBoolCodec(this);\n\t}\n};\nconst pgBoolDescriptor = new PgBoolDescriptor();\nconst pgBoolColumn = () => column(pgBoolDescriptor.factory(), pgBoolDescriptor.codecId, void 0);\nvar PgNumericCodec = class extends CodecImpl {\n\tparams;\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgNumericDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\tif (!isCanonicalNumericText(value)) throw postgresError(\"RUNTIME.ENCODE_FAILED\", \"pg/numeric@1 application value must be canonical numeric text: an optionally negated decimal numeral, or NaN, Infinity or -Infinity\", { meta: {\n\t\t\tcodecId: PG_NUMERIC_CODEC_ID,\n\t\t\treceived: value\n\t\t} });\n\t\treturn value;\n\t}\n\tconstructor(descriptor, params) {\n\t\tsuper(descriptor);\n\t\tthis.params = params;\n\t}\n\tdecodeJson(json) {\n\t\tconst text = decodeJsonMatching(PG_NUMERIC_CODEC_ID, json, CANONICAL_NUMERIC_TEXT, \"a decimal string\");\n\t\tconst { precision } = this.params;\n\t\tif (precision === void 0) return text;\n\t\tconst scale = this.params.scale ?? 0;\n\t\tif (!fitsNumeric(text, precision, scale)) return refuseJsonValue(PG_NUMERIC_CODEC_ID, `a decimal string that numeric(${precision}, ${scale}) stores without rounding`, json);\n\t\treturn text;\n\t}\n};\nvar PgNumericDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgNumeric.id;\n\tcodecId = PG_NUMERIC_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = pgNumericParams;\n\trenderOutputType(params) {\n\t\treturn pgNumericRenderOutputType(params);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgNumericCodec(this, params ?? {});\n\t}\n};\nconst pgNumericDescriptor = new PgNumericDescriptor();\nconst pgNumericColumn = (params = {}) => column(pgNumericDescriptor.factory(params), pgNumericDescriptor.codecId, params);\n/**\n* A genuinely unbounded integer over unconstrained Postgres `numeric` storage.\n* Application values are `bigint` and the canonical JSON is decimal text, like\n* `pg/int8@1`; decode rejects non-integral values. The descriptor claims no\n* target type, so `numeric` and `decimal` in type position stay `pg/numeric@1`.\n*/\nvar PgUnboundedIntCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgBigintEncode(PG_UNBOUNDED_INT_CODEC_ID, value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgUnboundedIntDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgBigintEncodeJson(PG_UNBOUNDED_INT_CODEC_ID, value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonIntegerText(PG_UNBOUNDED_INT_CODEC_ID, json);\n\t}\n};\nvar PgUnboundedIntDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgNumeric.id;\n\tcodecId = PG_UNBOUNDED_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = pgNumericParams;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgUnboundedIntCodec(this);\n\t}\n};\nconst pgUnboundedIntDescriptor = new PgUnboundedIntDescriptor();\nconst pgUnboundedIntColumn = () => column(pgUnboundedIntDescriptor.factory(), pgUnboundedIntDescriptor.codecId, void 0);\nvar PgTimetzCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimetzCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIMETZ_CODEC_ID, json, pgTimetzStoredText);\n\t}\n};\nvar PgTimetzDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgTimetz.id;\n\tcodecId = PG_TIMETZ_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"Timetz\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimetzCodec(this);\n\t}\n};\nconst pgTimetzDescriptor = new PgTimetzDescriptor();\nconst pgTimetzColumn = (params = {}) => column(pgTimetzDescriptor.factory(params), pgTimetzDescriptor.codecId, params);\nvar PgBitCodec = class extends CodecImpl {\n\tlength;\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length;\n\t}\n\tdecodeJson(json) {\n\t\tconst bits = decodeJsonMatching(PG_BIT_CODEC_ID, json, BIT_STRING, \"a string of 0 and 1 digits\");\n\t\tif (bits.length !== this.length) return refuseJsonValue(PG_BIT_CODEC_ID, `a string of exactly ${counted(this.length, \"bit\")}`, json);\n\t\treturn bits;\n\t}\n};\nvar PgBitDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgBit.id;\n\tcodecId = PG_BIT_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgBitLengthParams;\n\trenderOutputType(params) {\n\t\treturn renderLength(\"Bit\", params);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgBitCodec(this, params?.length ?? 1);\n\t}\n};\nconst pgBitDescriptor = new PgBitDescriptor();\nconst pgBitColumn = (params = {}) => column(pgBitDescriptor.factory(params), pgBitDescriptor.codecId, params);\nvar PgVarbitCodec = class extends CodecImpl {\n\tlength;\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length;\n\t}\n\tdecodeJson(json) {\n\t\tconst bits = decodeJsonMatching(PG_VARBIT_CODEC_ID, json, BIT_STRING, \"a string of 0 and 1 digits\");\n\t\tif (this.length !== void 0 && bits.length > this.length) return refuseJsonValue(PG_VARBIT_CODEC_ID, `a string of at most ${counted(this.length, \"bit\")}`, json);\n\t\treturn bits;\n\t}\n};\nvar PgVarbitDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgVarbit.id;\n\tcodecId = PG_VARBIT_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgBitLengthParams;\n\trenderOutputType(params) {\n\t\treturn renderLength(\"VarBit\", params);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgVarbitCodec(this, params?.length);\n\t}\n};\nconst pgVarbitDescriptor = new PgVarbitDescriptor();\nconst pgVarbitColumn = (params = {}) => column(pgVarbitDescriptor.factory(params), pgVarbitDescriptor.codecId, params);\nvar PgByteaCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgByteaDecodeWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgByteaEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn pgByteaDecodeJson(json);\n\t}\n};\nvar PgByteaDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn base64JsonProjection(expression);\n\t}\n\tdataType = pgBytea.id;\n\tcodecId = PG_BYTEA_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgByteaCodec(this);\n\t}\n};\nconst pgByteaDescriptor = new PgByteaDescriptor();\nvar PgUuidCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn canonicalUuid(value) ?? value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonMatching(PG_UUID_CODEC_ID, json, CANONICAL_UUID, \"a UUID as PostgreSQL writes it, in lower case and hyphenated 8-4-4-4-12\");\n\t}\n};\nvar PgUuidDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgUuid.id;\n\tcodecId = PG_UUID_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgUuidCodec(this);\n\t}\n};\nconst pgUuidDescriptor = new PgUuidDescriptor();\nconst pgUuidColumn = () => column(pgUuidDescriptor.factory(), pgUuidDescriptor.codecId, void 0);\nvar PgInetCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(PG_INET_CODEC_ID, json);\n\t}\n};\nvar PgInetDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInet.id;\n\tcodecId = PG_INET_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgInetCodec(this);\n\t}\n};\nconst pgInetDescriptor = new PgInetDescriptor();\nconst pgInetColumn = () => column(pgInetDescriptor.factory(), pgInetDescriptor.codecId, void 0);\nvar PgTsqueryCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn blindCast(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn blindCast(decodeJsonString(PG_TSQUERY_CODEC_ID, json));\n\t}\n};\n/**\n* The type of a full-text query: what the parsers and the tag in `full-text` return, and what a\n* `tsquery` value read back from a query binds as when passed to `fullTextMatches`, `fullTextRank`\n* or `fullTextHeadline`. It has no column helper, because a contract cannot author a `tsquery`\n* column, and no traits, because comparing or ordering queries means nothing to an application.\n*/\nvar PgTsqueryDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgTsquery.id;\n\tcodecId = PG_TSQUERY_CODEC_ID;\n\ttraits = [];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgTsqueryCodec(this);\n\t}\n};\nconst pgTsqueryDescriptor = new PgTsqueryDescriptor();\n/**\n* An application value is a {@link PgInterval} — the three fields PostgreSQL\n* actually stores, `{ months, days, micros }` — and its canonical JSON is the\n* ISO-8601 duration string PostgreSQL spells under\n* `IntervalStyle = 'iso_8601'`: `P1M`, `P30D`, `P1Y2M3DT4H5M6S`, `PT0S` for\n* zero, each component carrying its own sign.\n*\n* Value and representation are independent here, as they are for `pg/bytea@1`\n* (`Uint8Array` carried as base64) and `pg/int8@1` (`bigint` carried as decimal\n* text). Reading an interval hands back numbers to compute with rather than a\n* string to parse; writing one takes the same numbers.\n*\n* The fields stay independent because a month has no fixed length: `{months: 1}`\n* and `{days: 30}` are different values and neither converts to the other. The\n* ISO rendering normalises only in its own spelling — twelve months render as a\n* year — so `{months: 13}` renders `P1Y1M` and reads back as `{months: 13}`.\n*/\nvar PgIntervalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgIntervalToIso(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgIntervalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgIntervalEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn pgIntervalDecodeJson(json);\n\t}\n};\nvar PgIntervalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn isoDurationJsonProjection(expression);\n\t}\n\tdataType = pgInterval.id;\n\tcodecId = PG_INTERVAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"Interval\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgIntervalCodec(this);\n\t}\n};\nconst pgIntervalDescriptor = new PgIntervalDescriptor();\nconst pgIntervalColumn = (params = {}) => column(pgIntervalDescriptor.factory(params), pgIntervalDescriptor.codecId, params);\nvar PgJsonCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgJsonEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgJsonDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar PgJsonDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgJson.id;\n\tcodecId = PG_JSON_CODEC_ID;\n\ttraits = [];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgJsonCodec(this);\n\t}\n};\nconst pgJsonDescriptor = new PgJsonDescriptor();\nconst pgJsonColumn = () => column(pgJsonDescriptor.factory(), pgJsonDescriptor.codecId, void 0);\nvar PgJsonbCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgJsonbEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgJsonbDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar PgJsonbDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgJsonb.id;\n\tcodecId = PG_JSONB_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgJsonbCodec(this);\n\t}\n};\nconst pgJsonbDescriptor = new PgJsonbDescriptor();\nconst pgJsonbColumn = () => column(pgJsonbDescriptor.factory(), pgJsonbDescriptor.codecId, void 0);\nvar PgIntCodec = class extends SqlIntCodec {\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(this.id, json, INT32_RANGE);\n\t}\n};\n/**\n* `sql/char@1` as PostgreSQL stores it: a `character` column holds its length in characters, and one with no length is `character(1)`.\n*/\nvar PgCharCodec = class extends SqlCharCodec {\n\tlength;\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length ?? 1;\n\t}\n\tdecodeJson(json) {\n\t\tif (!fitsCharacterLength(decodeJsonString(this.id, json), this.length, true)) return refuseJsonValue(this.id, `a string of at most ${counted(this.length, \"character\")} before any trailing spaces`, json);\n\t\treturn super.decodeJson(json);\n\t}\n};\n/** `sql/varchar@1` as PostgreSQL stores it: a `character varying` column with a length holds at most that many characters. */\nvar PgVarcharCodec = class extends SqlVarcharCodec {\n\tlength;\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length;\n\t}\n\tdecodeJson(json) {\n\t\tconst text = super.decodeJson(json);\n\t\tif (this.length !== void 0 && !fitsCharacterLength(text, this.length, false)) return refuseJsonValue(this.id, `a string of at most ${counted(this.length, \"character\")}`, json);\n\t\treturn text;\n\t}\n};\nvar PgFloatCodec = class extends SqlFloatCodec {\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n};\nvar PgCharDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn unpaddedCharJsonProjection(expression);\n\t}\n\tdataType = pgChar.id;\n\tcodecId = PG_CHAR_CODEC_ID;\n\ttraits = sqlCharDescriptor.traits;\n\tparamsSchema = pgCharacterLengthParams;\n\trenderOutputType(params) {\n\t\treturn sqlCharDescriptor.renderOutputType(params);\n\t}\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgCharCodec(this, params?.length);\n\t}\n};\nconst pgCharDescriptor = new PgCharDescriptor();\nconst pgCharColumn = (params = {}) => column(pgCharDescriptor.factory(params), pgCharDescriptor.codecId, params);\nvar PgVarcharDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgVarchar.id;\n\tcodecId = PG_VARCHAR_CODEC_ID;\n\ttraits = sqlVarcharDescriptor.traits;\n\tparamsSchema = pgCharacterLengthParams;\n\trenderOutputType(params) {\n\t\treturn sqlVarcharDescriptor.renderOutputType(params);\n\t}\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgVarcharCodec(this, params?.length);\n\t}\n};\nconst pgVarcharDescriptor = new PgVarcharDescriptor();\nconst pgVarcharColumn = (params = {}) => column(pgVarcharDescriptor.factory(params), pgVarcharDescriptor.codecId, params);\nvar PgIntDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInt4.id;\n\tcodecId = PG_INT_CODEC_ID;\n\ttraits = sqlIntDescriptor.traits;\n\tparamsSchema = sqlIntDescriptor.paramsSchema;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgIntCodec(this);\n\t}\n};\nconst pgIntDescriptor = new PgIntDescriptor();\nconst pgIntColumn = () => column(pgIntDescriptor.factory(), pgIntDescriptor.codecId, void 0);\nvar PgFloatDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgFloat8.id;\n\tcodecId = PG_FLOAT_CODEC_ID;\n\ttraits = sqlFloatDescriptor.traits;\n\tparamsSchema = sqlFloatDescriptor.paramsSchema;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgFloatCodec(this);\n\t}\n};\nconst pgFloatDescriptor = new PgFloatDescriptor();\nconst pgFloatColumn = () => column(pgFloatDescriptor.factory(), pgFloatDescriptor.codecId, void 0);\nconst codecDescriptors = definePostgresCodecs([\n\tpostgresSqlCharDescriptor,\n\tpostgresSqlVarcharDescriptor,\n\tpostgresSqlIntDescriptor,\n\tpostgresSqlFloatDescriptor,\n\tpostgresSqlTextDescriptor,\n\tpgTextDescriptor,\n\tpgEnumDescriptor,\n\tpgCharDescriptor,\n\tpgVarcharDescriptor,\n\tpgIntDescriptor,\n\tpgFloatDescriptor,\n\tpgInt4Descriptor,\n\tpgInt2Descriptor,\n\tpgInt8Descriptor,\n\tpgInt8NumberDescriptor,\n\tpgFloat4Descriptor,\n\tpgFloat8Descriptor,\n\tpgNumericDescriptor,\n\tpgUnboundedIntDescriptor,\n\tpgDateTemporalDescriptor,\n\tpgTimestampTemporalDescriptor,\n\tpgTimestamptzTemporalDescriptor,\n\tpgTimeTemporalDescriptor,\n\tpgDateStringDescriptor,\n\tpgTimestampStringDescriptor,\n\tpgTimestamptzStringDescriptor,\n\tpgTimestamptzDateDescriptor,\n\tpgTimeStringDescriptor,\n\tpgTimetzDescriptor,\n\tpgBoolDescriptor,\n\tpgBitDescriptor,\n\tpgVarbitDescriptor,\n\tpgByteaDescriptor,\n\tpgUuidDescriptor,\n\tpgInetDescriptor,\n\tpgIntervalDescriptor,\n\tpgJsonDescriptor,\n\tpgJsonbDescriptor,\n\tpgTextArrayDescriptor,\n\tpgTsqueryDescriptor\n]);\n//#endregion\nexport { pgTimestamptzDateDescriptor as A, pgUuidColumn as C, PgTimestamptzDateCodec as D, postgresQualifyColumnType as E, setFallbackTemporal as M, PgTimestamptzDateDescriptor as O, pgUnboundedIntColumn as S, pgVarcharColumn as T, pgJsonColumn as _, pgCharColumn as a, pgTextColumn as b, pgFloat8Column as c, pgInt2Column as d, pgInt4Column as f, pgIntervalColumn as g, pgIntColumn as h, pgBoolColumn as i, requireTemporal as j, pgTimestamptzDateColumn as k, pgFloatColumn as l, pgInt8NumberColumn as m, isPgEnumParams as n, pgEnumDescriptor as o, pgInt8Column as p, pgBitColumn as r, pgFloat4Column as s, codecDescriptors as t, pgInetColumn as u, pgJsonbColumn as v, pgVarbitColumn as w, pg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M,kBAAkB,IAAI,gBAAgB;AAC5C,MAAM,oBAAoB,OAAO,gBAAgB,QAAQ,GAAG,gBAAgB,SAAS,KAAK,CAAC;AAC3F,IAAI,oBAAoB,cAAc,wBAAwB;CAC7D,eAAe,YAAY;EAC1B,OAAO;CACR;CACA,WAAW,SAAS;CACpB,UAAU;CACV,SAAS,mBAAmB;CAC5B,eAAe,mBAAmB;CAClC,mBAAmB,OAAO;EACzB,OAAO,gBAAgB,KAAK;CAC7B;CACA,UAAU;EACT,aAAa,IAAI,aAAa,IAAI;CACnC;AACD;AACA,MAAM,oBAAoB,IAAI,kBAAkB;AAChD,MAAM,sBAAsB,OAAO,kBAAkB,QAAQ,GAAG,kBAAkB,SAAS,KAAK,CAAC;AACjG,MAAM,mBAAmB,qBAAqB;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"codecs-DelwJv6h-CFbyTJIJ.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codecs-DelwJv6h.mjs"],"sourcesContent":["import { A as PG_TIME_TEMPORAL_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, N as PG_UUID_CODEC_ID, O as PG_TIMETZ_CODEC_ID, P as PG_VARBIT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, i as PG_CHAR_CODEC_ID, j as PG_TSQUERY_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_ENUM_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID, y as PG_JSON_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { a as errorTemporalUnrepresentable, i as errorTemporalUnavailableForDefault, n as errorTemporalNonIsoCalendar, o as errorTemporalWrongType, r as errorTemporalUnavailable, s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { A as pgNumericRenderOutputType, C as pgIntervalEncodeJson, D as pgJsonbDecode, E as pgJsonEncode, M as renderLength, N as renderPrecision, O as pgJsonbEncode, S as pgIntervalDecodeJson, T as pgJsonDecode, _ as pgInt8NumberDecodeJson, a as decimalTextNumberLiteral, c as pgBigintEncode, d as pgByteaDecodeJson, f as pgByteaDecodeWire, g as pgInt8NumberDecode, h as pgInt8Decode, i as decimalTextBigintLiteral, j as pgUnboundedIntDecode, k as pgNumericDecode, l as pgBigintEncodeJson, m as pgFloatEncode, n as FLOAT4_MAX, o as fitsCharacterLength, p as pgByteaEncodeJson, r as canonicalUuid, s as fitsFloat4, t as CANONICAL_UUID, v as pgInt8NumberEncode, w as pgIntervalToIso, x as pgIntervalDecode, y as pgInt8NumberEncodeJson } from \"./codec-helpers-D015Pvwa.mjs\";\nimport { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from \"./data-types-k3Ebk3kj.mjs\";\nimport { a as postgresCodec, r as definePostgresCodecs, t as PostgresCodecDescriptor } from \"./codec-descriptor-CZAGhM_O.mjs\";\nimport \"./namespace-ids-xtp_ZY86.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { BinaryExpr, CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, OrExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlTextDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { canonicalDateTime } from \"@internal/sql-contract/data-type-support\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { CodecImpl, INT32_RANGE, INT64_RANGE, column, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, encodeJsonFloat, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { counted, withoutTrailing } from \"@internal/utils/text\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\n//#region src/core/require-temporal.ts\nlet fallback;\n/**\n* Sets the implementation `requireTemporal` returns when the runtime has no global `Temporal`.\n* The value is held once per process. Only the control entry calls this.\n*/\nfunction setFallbackTemporal(implementation) {\n\tfallback = implementation;\n}\n/**\n* The `Temporal` to use: the runtime's own when it has one, else the fallback. Throws\n* `RUNTIME.TEMPORAL_UNAVAILABLE` when there is neither.\n*/\nfunction requireTemporal(meta) {\n\tif (typeof Temporal !== \"undefined\") return Temporal;\n\tif (fallback !== void 0) return fallback;\n\tthrow \"generatorId\" in meta ? errorTemporalUnavailableForDefault(meta.generatorId) : errorTemporalUnavailable(meta.codecId, meta.operation);\n}\n//#endregion\n//#region src/core/temporal-codec-helpers.ts\nconst POSTGRES_TEMPORAL_SENTINELS = /* @__PURE__ */ new Set([\"infinity\", \"-infinity\"]);\nconst EXPANDED_YEAR_DIGITS = 6;\nconst ORDINARY_YEAR_DIGITS = 4;\nconst BC_SUFFIX = \" BC\";\nfunction adaptPostgresEra(text) {\n\tconst isBc = text.endsWith(BC_SUFFIX);\n\tconst body = isBc ? text.slice(0, -3) : text;\n\tconst yearEnd = body.indexOf(\"-\");\n\tif (yearEnd <= 0) return text;\n\tconst yearText = body.slice(0, yearEnd);\n\tif (!isBc && yearText.length <= ORDINARY_YEAR_DIGITS) return text;\n\tconst year = Number(yearText);\n\tif (!Number.isInteger(year)) return text;\n\tconst proleptic = isBc ? 1 - year : year;\n\treturn `${proleptic < 0 ? \"-\" : \"+\"}${String(Math.abs(proleptic)).padStart(EXPANDED_YEAR_DIGITS, \"0\")}${body.slice(yearEnd)}`;\n}\nfunction decodeTemporalText(identity, wire, parse, adapt) {\n\tconst temporal = requireTemporal({\n\t\tcodecId: identity.codecId,\n\t\toperation: \"decode\"\n\t});\n\tif (POSTGRES_TEMPORAL_SENTINELS.has(wire)) throw errorTemporalUnrepresentable({\n\t\t...identity,\n\t\toperation: \"decode\",\n\t\tvalue: wire,\n\t\tdetail: `PostgreSQL's ${wire} is a sentinel with no position on the timeline, so no Temporal value denotes it`\n\t});\n\ttry {\n\t\treturn parse(temporal, adapt(wire));\n\t} catch (cause) {\n\t\tthrow errorTemporalUnrepresentable({\n\t\t\t...identity,\n\t\t\toperation: \"decode\",\n\t\t\tvalue: wire,\n\t\t\tdetail: cause instanceof Error ? cause.message : String(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\nfunction encodeTemporalValue(identity, value) {\n\tconst tag = typeof value === \"object\" && value !== null ? Reflect.get(value, Symbol.toStringTag) : void 0;\n\tif (tag !== identity.temporalTag) throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, describeEncodeInput(value, tag));\n\tif (value.calendarId !== void 0 && value.calendarId !== \"iso8601\") throw errorTemporalNonIsoCalendar(identity.codecId, value.calendarId);\n\treturn value.toString();\n}\nfunction describeEncodeInput(value, tag) {\n\tif (typeof tag === \"string\") return `a ${tag}`;\n\tif (value instanceof Date) return \"a Date\";\n\tif (value === null) return \"null\";\n\treturn `a ${typeof value}`;\n}\nconst DATE_TEMPORAL = {\n\tcodecId: PG_DATE_TEMPORAL_CODEC_ID,\n\tstringType: \"DateString\",\n\ttemporalTag: \"Temporal.PlainDate\"\n};\nconst TIMESTAMP_TEMPORAL = {\n\tcodecId: PG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\tstringType: \"TimestampString(p)\",\n\ttemporalTag: \"Temporal.PlainDateTime\"\n};\nconst TIMESTAMPTZ_TEMPORAL = {\n\tcodecId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\tstringType: \"TimestamptzString(p)\",\n\ttemporalTag: \"Temporal.Instant\"\n};\nconst TIME_TEMPORAL = {\n\tcodecId: PG_TIME_TEMPORAL_CODEC_ID,\n\tstringType: \"TimeString(p)\",\n\ttemporalTag: \"Temporal.PlainTime\"\n};\nconst unadapted = (text) => text;\nconst pgDateTemporalDecode = (wire) => decodeTemporalText(DATE_TEMPORAL, wire, (temporal, text) => temporal.PlainDate.from(text), adaptPostgresEra);\nconst pgDateTemporalEncode = (value) => encodeTemporalValue(DATE_TEMPORAL, value);\nconst pgTimestampTemporalDecode = (wire) => decodeTemporalText(TIMESTAMP_TEMPORAL, wire, (temporal, text) => temporal.PlainDateTime.from(text), adaptPostgresEra);\nconst pgTimestampTemporalEncode = (value) => encodeTemporalValue(TIMESTAMP_TEMPORAL, value);\nconst pgTimestamptzTemporalDecode = (wire) => decodeTemporalText(TIMESTAMPTZ_TEMPORAL, wire, (temporal, text) => temporal.Instant.from(text), adaptPostgresEra);\nconst pgTimestamptzTemporalEncode = (value) => encodeTemporalValue(TIMESTAMPTZ_TEMPORAL, value);\nconst pgTimeTemporalDecode = (wire) => decodeTemporalText(TIME_TEMPORAL, wire, (temporal, text) => temporal.PlainTime.from(text), unadapted);\nconst pgTimeTemporalEncode = (value) => encodeTemporalValue(TIME_TEMPORAL, value);\nconst EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS = (/* @__PURE__ */ new Date(\"-004713-11-24T00:00:00Z\")).getTime();\nfunction utcText(value, codecId, zone) {\n\tconst milliseconds = value.getTime();\n\tif (!Number.isFinite(milliseconds) || milliseconds < EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS) throw new RangeError(`${codecId} writes a Date as UTC text and needs a valid Date on or after 4714-11-24 BC, the earliest timestamp PostgreSQL holds; got ${String(value)}`);\n\tconst year = value.getUTCFullYear();\n\tconst iso = value.toISOString();\n\tconst monthOnward = iso.slice(iso.indexOf(\"-\", 1), -1);\n\treturn `${String(year <= 0 ? 1 - year : year).padStart(ORDINARY_YEAR_DIGITS, \"0\")}${monthOnward}${zone}${year <= 0 ? BC_SUFFIX : \"\"}`;\n}\nconst utcTimestampText = (value, codecId) => utcText(value, codecId, \"\");\nconst utcTimestamptzText = (value, codecId) => utcText(value, codecId, \"Z\");\n//#endregion\n//#region src/core/date-codecs.ts\nconst TIMESTAMPTZ_TEXT = /^([+-]\\d{6}|\\d{4,6})-(\\d{2})-(\\d{2})[ T](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,6}))?(?:Z|([+-])(\\d{2})(?::?(\\d{2}))?(?::?(\\d{2}))?)( BC)?$/;\nfunction invalidDate() {\n\treturn /* @__PURE__ */ new RangeError(`${PG_TIMESTAMPTZ_DATE_CODEC_ID} requires a valid Date or a representable ISO PostgreSQL timestamp with time zone; use TimestamptzString for unsupported values`);\n}\nfunction isRepresentable(value) {\n\treturn value instanceof Date && Number.isFinite(value.getTime()) && value.getTime() >= EARLIEST_POSTGRES_TIMESTAMP_MILLISECONDS;\n}\nfunction validateDate(value) {\n\tif (!isRepresentable(value)) throw invalidDate();\n\treturn value;\n}\nfunction decodeDate(wire) {\n\tconst date = typeof wire === \"string\" ? parseDate(wire) : void 0;\n\tif (date === void 0) throw invalidDate();\n\treturn date;\n}\n/** The instant a timestamp with time zone as PostgreSQL writes it names, or `undefined` when the text is not one. */\nfunction parseDate(text) {\n\tconst match = TIMESTAMPTZ_TEXT.exec(text);\n\tif (!match) return void 0;\n\tconst [, yearText = \"\", monthText, dayText, hourText, minuteText, secondText, fraction = \"\", sign, offsetHour = \"0\", offsetMinute = \"0\", offsetSecond = \"0\", era] = match;\n\tconst year = era ? 1 - Number(yearText) : Number(yearText);\n\tconst month = Number(monthText) - 1;\n\tconst day = Number(dayText);\n\tconst hour = Number(hourText);\n\tconst minute = Number(minuteText);\n\tconst second = Number(secondText);\n\tconst milliseconds = Number(fraction.slice(0, 3).padEnd(3, \"0\"));\n\tconst cycles = Math.floor((year - 2e3) / 400);\n\tconst safeYear = year - cycles * 400;\n\tconst local = /* @__PURE__ */ new Date(0);\n\tlocal.setUTCFullYear(safeYear, month, day);\n\tlocal.setUTCHours(hour, minute, second, milliseconds);\n\tif (era !== void 0 && (Number(yearText) === 0 || /^[+-]/.test(yearText)) || local.getUTCFullYear() !== safeYear || local.getUTCMonth() !== month || local.getUTCDate() !== day || local.getUTCHours() !== hour || local.getUTCMinutes() !== minute || local.getUTCSeconds() !== second || Number(offsetHour) > 15 || Number(offsetMinute) > 59 || Number(offsetSecond) > 59) return void 0;\n\tconst offset = (Number(offsetHour) * 3600 + Number(offsetMinute) * 60 + Number(offsetSecond)) * (sign === \"-\" ? -1 : 1);\n\tconst value = /* @__PURE__ */ new Date(local.getTime() - offset * 1e3 + cycles * 146097 * 864e5);\n\treturn isRepresentable(value) ? value : void 0;\n}\nfunction encodeDate(value) {\n\treturn utcTimestamptzText(validateDate(value), PG_TIMESTAMPTZ_DATE_CODEC_ID);\n}\nvar PgTimestamptzDateCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn encodeDate(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodeDate(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestamptzCanonical(validateDate(value).toISOString());\n\t}\n\tdecodeJson(json) {\n\t\treturn parseDate(decodeJsonString(\"pg/timestamptz-date@1\", json)) ?? refuseJsonValue(\"pg/timestamptz-date@1\", \"a timestamp with time zone as PostgreSQL writes it\", json);\n\t}\n};\nvar PgTimestamptzDateDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamptz.id;\n\tcodecId = PG_TIMESTAMPTZ_DATE_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(_params) {\n\t\treturn \"Date\";\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimestamptzDateCodec(this);\n\t}\n};\nconst pgTimestamptzDateDescriptor = new PgTimestamptzDateDescriptor();\nconst pgTimestamptzDateColumn = (params = {}) => column(pgTimestamptzDateDescriptor.factory(params), pgTimestamptzDateDescriptor.codecId, params);\n//#endregion\n//#region src/core/date-time-stored-text.ts\nconst YEAR = String.raw`(?:[+-]\\d{6}|\\d{4,7})`;\nconst DATE = String.raw`${YEAR}-\\d{2}-\\d{2}`;\nconst TIME = String.raw`\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?`;\nconst OFFSET = String.raw`(?:Z|[+-]\\d{2}(?::\\d{2}(?::\\d{2})?)?)`;\nconst INFINITY = \"infinity|-infinity|\";\nconst BC = \"(?: BC)?\";\nconst FORMS = {\n\tdate: `${DATE}${BC}`,\n\ttime: TIME,\n\ttimeWithOffset: `${TIME}${OFFSET}`,\n\tdateTime: `${DATE}[ T]${TIME}${BC}`,\n\tinstant: `${DATE}[ T]${TIME}${OFFSET}${BC}`\n};\nconst DATED = /^([+-]?)(\\d{4,7})(-.*?)( BC)?$/;\nconst END_OF_DAY = /^24:00:00(?:\\.0+)?(?![.\\d])/;\n/** PostgreSQL's largest UTC offset, which it writes for no type past 15:59:59. */\nconst MAX_OFFSET_HOURS = 15;\nfunction storedText(options) {\n\treturn {\n\t\tdataType: options.dataType,\n\t\tshape: options.shape,\n\t\tpattern: new RegExp(`^(?:${options.infinity ? INFINITY : \"\"}${FORMS[options.shape]})$`),\n\t\tdescription: `${options.description} in ISO 8601 or as PostgreSQL writes it`,\n\t\tendOfDay: options.endOfDay\n\t};\n}\nconst pgDateStoredText = storedText({\n\tdataType: pgDate.id,\n\tshape: \"date\",\n\tdescription: \"a date\",\n\tinfinity: true,\n\tendOfDay: false\n});\nconst pgTimeStoredText = storedText({\n\tdataType: pgTime.id,\n\tshape: \"time\",\n\tdescription: \"a time of day\",\n\tinfinity: false,\n\tendOfDay: true\n});\nconst pgTimetzStoredText = storedText({\n\tdataType: pgTimetz.id,\n\tshape: \"timeWithOffset\",\n\tdescription: \"a time of day with a UTC offset\",\n\tinfinity: false,\n\tendOfDay: true\n});\nconst pgTimestampStoredText = storedText({\n\tdataType: pgTimestamp.id,\n\tshape: \"dateTime\",\n\tdescription: \"a date and time of day\",\n\tinfinity: true,\n\tendOfDay: false\n});\nconst pgTimestamptzStoredText = storedText({\n\tdataType: pgTimestamptz.id,\n\tshape: \"instant\",\n\tdescription: \"a date and time of day with a UTC offset\",\n\tinfinity: true,\n\tendOfDay: false\n});\n/** The text with its year moved into the 400-year cycle from 2000, or `undefined` for a year no calendar has. */\nfunction inGregorianCycle(text) {\n\tconst match = DATED.exec(text);\n\tif (match === null) return text;\n\tconst [, sign = \"\", digits = \"\", rest = \"\", bc] = match;\n\tconst year = Number(digits);\n\tif (bc !== void 0 && (sign !== \"\" || year === 0) || sign === \"-\" && year === 0) return;\n\treturn `${2e3 + ((bc !== void 0 ? 1 - year : sign === \"-\" ? -year : year) % 400 + 400) % 400}${rest}`;\n}\nfunction holdsValue(stored, text) {\n\tif (text === \"infinity\" || text === \"-infinity\") return true;\n\tconst cycled = inGregorianCycle(text);\n\tif (cycled === void 0) return false;\n\tconst read = stored.endOfDay ? cycled.replace(END_OF_DAY, \"00:00:00\") : cycled;\n\ttry {\n\t\tcanonicalDateTime(read, {\n\t\t\tshape: stored.shape,\n\t\t\townerId: stored.dataType,\n\t\t\tmaxOffsetHours: MAX_OFFSET_HOURS\n\t\t});\n\t\treturn true;\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.CAST_REFUSED\") return false;\n\t\tthrow error;\n\t}\n}\n/** Reads a stored date or time text, refusing text in another form or naming no real date and time. */\nfunction decodeJsonDateTimeText(codecId, json, stored) {\n\tconst text = decodeJsonMatching(codecId, json, stored.pattern, stored.description);\n\treturn holdsValue(stored, text) ? text : refuseJsonValue(codecId, stored.description, json);\n}\n//#endregion\n//#region src/core/temporal-codecs.ts\nvar PgDateTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgDateTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgDateTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgDateCanonical(pgDateTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgDateTemporalDecode(decodeJsonString(PG_DATE_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgDateTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgDate.id;\n\tcodecId = PG_DATE_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgDateTemporalCodec(this);\n\t}\n};\nconst pgDateTemporalDescriptor = new PgDateTemporalDescriptor();\nvar PgTimestampTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgTimestampTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgTimestampTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestampCanonical(pgTimestampTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgTimestampTemporalDecode(decodeJsonString(PG_TIMESTAMP_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgTimestampTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamp.id;\n\tcodecId = PG_TIMESTAMP_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\tfactory(_params) {\n\t\treturn () => new PgTimestampTemporalCodec(this);\n\t}\n};\nconst pgTimestampTemporalDescriptor = new PgTimestampTemporalDescriptor();\nvar PgTimestamptzTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgTimestamptzTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgTimestamptzTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestamptzCanonical(pgTimestamptzTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgTimestamptzTemporalDecode(decodeJsonString(PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgTimestamptzTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamptz.id;\n\tcodecId = PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\tfactory(_params) {\n\t\treturn () => new PgTimestamptzTemporalCodec(this);\n\t}\n};\nconst pgTimestamptzTemporalDescriptor = new PgTimestamptzTemporalDescriptor();\nvar PgTimeTemporalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgTimeTemporalEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgTimeTemporalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimeCanonical(pgTimeTemporalEncode(value));\n\t}\n\tdecodeJson(json) {\n\t\treturn pgTimeTemporalDecode(decodeJsonString(PG_TIME_TEMPORAL_CODEC_ID, json));\n\t}\n};\nvar PgTimeTemporalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTime.id;\n\tcodecId = PG_TIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\tfactory(_params) {\n\t\treturn () => new PgTimeTemporalCodec(this);\n\t}\n};\nconst pgTimeTemporalDescriptor = new PgTimeTemporalDescriptor();\n//#endregion\n//#region src/core/temporal-string-codecs.ts\nvar PgDateStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgDateCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_DATE_STRING_CODEC_ID, json, pgDateStoredText);\n\t}\n};\nvar PgDateStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgDate.id;\n\tcodecId = PG_DATE_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgDateStringCodec(this);\n\t}\n};\nconst pgDateStringDescriptor = new PgDateStringDescriptor();\nvar PgTimestampStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value instanceof Date ? utcTimestampText(value, this.id) : value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestampCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIMESTAMP_STRING_CODEC_ID, json, pgTimestampStoredText);\n\t}\n};\nvar PgTimestampStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamp.id;\n\tcodecId = PG_TIMESTAMP_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"TimestampString\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimestampStringCodec(this);\n\t}\n};\nconst pgTimestampStringDescriptor = new PgTimestampStringDescriptor();\nvar PgTimestamptzStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value instanceof Date ? utcTimestamptzText(value, this.id) : value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimestamptzCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIMESTAMPTZ_STRING_CODEC_ID, json, pgTimestamptzStoredText);\n\t}\n};\nvar PgTimestamptzStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTimestamptz.id;\n\tcodecId = PG_TIMESTAMPTZ_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"TimestamptzString\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimestamptzStringCodec(this);\n\t}\n};\nconst pgTimestamptzStringDescriptor = new PgTimestamptzStringDescriptor();\nvar PgTimeStringCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimeCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIME_STRING_CODEC_ID, json, pgTimeStoredText);\n\t}\n};\nvar PgTimeStringDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"text\");\n\t}\n\tdataType = pgTime.id;\n\tcodecId = PG_TIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"TimeString\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimeStringCodec(this);\n\t}\n};\nconst pgTimeStringDescriptor = new PgTimeStringDescriptor();\n//#endregion\n//#region src/core/codecs.ts\n/**\n* Projects the expression unchanged, for codecs whose canonical JSON is what\n* PostgreSQL's own JSON conversion already produces.\n*\n* Identity here is a claim about the target's behaviour, not an absence of one:\n* the codec's conformance cases are what test it, including at the boundaries\n* of the representation — escaping, sign, and range — where a native conversion\n* would be most likely to diverge.\n*/\n/**\n* Whether a string is numeric text in the form PostgreSQL *prints*, which is\n* narrower than the form it accepts.\n*\n* `numeric` reads `+123`, `.5`, `1.`, `1e5`, `0x1f`, `1_000` and whitespace-padded\n* input, but prints every one of them in a single normalised form — `123`,\n* `0.5`, `1`, `100000`, `31`, `1000`, `12`. The projection reads the column back\n* through that printing, so accepting an input spelling here would produce an\n* application value the projection can never return: `encodeJson('1e5')` would\n* claim `1e5` where the database yields `100000`.\n*\n* `NaN`, `Infinity` and `-Infinity` are genuine `numeric` values, not error\n* states, and PostgreSQL emits them into JSON as strings — so they belong to the\n* canonical form and round-trip like any other value.\n*/\nconst CANONICAL_NUMERIC_TEXT = /^(?:-?\\d+(?:\\.\\d+)?|NaN|-?Infinity)$/;\nconst isCanonicalNumericText = (value) => CANONICAL_NUMERIC_TEXT.test(value);\n/**\n* Whether canonical numeric text is a value `numeric(precision, scale)` stores without rounding: a whole number of units of 10^-scale, and at most `precision` digits once counted in those units. A negative scale rounds to tens, hundreds and so on, and a scale above the precision allows only values below 1. NaN fits; an infinity does not.\n*/\nfunction fitsNumeric(text, precision, scale) {\n\tif (text === \"NaN\") return true;\n\tif (text.endsWith(\"Infinity\")) return false;\n\tconst [whole = \"\", fraction = \"\"] = text.replace(/^-/, \"\").split(\".\");\n\tconst significantFraction = withoutTrailing(fraction, \"0\");\n\tconst digits = `${whole}${significantFraction}`.replace(/^0+/, \"\");\n\tif (digits === \"\") return true;\n\tconst shift = scale - significantFraction.length;\n\tif (shift >= 0) return digits.length + shift <= precision;\n\tconst units = withoutTrailing(digits, \"0\");\n\tif (digits.length - units.length < -shift) return false;\n\treturn digits.length + shift <= precision;\n}\nconst identityJsonProjection = (expression) => expression;\n/**\n* Projects a `character` value as text, which drops the trailing spaces that pad it to its length and nothing else, so an include reads the value a flat read's `decode` returns.\n*/\nconst unpaddedCharJsonProjection = (expression) => CastExpr.as(expression, \"text\");\nconst BIT_STRING = /^[01]*$/;\nconst decodePostgresNumberWire = (wire) => typeof wire === \"string\" ? Number(wire) : wire;\nconst decodePostgresBooleanWire = (wire) => {\n\tif (typeof wire === \"boolean\") return wire;\n\tif (wire === \"t\" || wire === \"true\") return true;\n\tif (wire === \"f\" || wire === \"false\") return false;\n\tthrow postgresError(\"RUNTIME.DECODE_FAILED\", \"pg/bool@1 wire value must be boolean text\", { meta: {\n\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\treceived: wire\n\t} });\n};\n/**\n* Projects a numeric-valued expression as decimal text.\n*\n* The cast is part of the projected expression, which is what makes it correct:\n* whatever `jsonProjection` returns is the argument the JSON constructor\n* receives, so casting here happens *before* PostgreSQL builds the JSON value.\n* Handed a `numeric` or `int8` directly, the constructor emits a JSON **number**,\n* and every digit past IEEE-754's 53 bits of significand is gone by the time the\n* driver has parsed it — before any codec can intervene. A cast applied to the\n* constructor's result instead of its argument would be too late to matter.\n*/\nconst decimalTextJsonProjection = (expression) => CastExpr.as(expression, \"text\");\n/**\n* Projects a `bytea` as base64 text.\n*\n* Like the decimal-text cast, the encoding is part of the projected expression:\n* PostgreSQL's own JSON conversion of a `bytea` emits its `\\x`-prefixed hex\n* output form, so the base64 encoding has to replace that conversion rather\n* than post-process it.\n*\n* `encode` emits RFC 2045 base64, which carries a line break every 76\n* characters — so any value over 56 bytes arrives wrapped. The breaks are\n* removed here, because the canonical form is unwrapped base64 and\n* `decodeJson` rejects anything else. `chr(10)` rather than a newline literal\n* keeps the rendered SQL on one line.\n*/\nconst base64JsonProjection = (expression) => FunctionCallExpr.of(\"translate\", [\n\tFunctionCallExpr.of(\"encode\", [expression, LiteralExpr.of(\"base64\")]),\n\tFunctionCallExpr.of(\"chr\", [LiteralExpr.of(10)]),\n\tLiteralExpr.of(\"\")\n]);\nconst datePart = (field, expression) => FunctionCallExpr.of(\"date_part\", [LiteralExpr.of(field), expression]);\nconst whenNonZero = (value, rendered) => CaseExpr.of([{\n\tcondition: BinaryExpr.neq(value, LiteralExpr.of(0)),\n\tvalue: rendered\n}], LiteralExpr.of(null));\n/**\n* Projects an `interval` as an ISO-8601 duration.\n*\n* An interval carries months, days and microseconds independently — `P1M` and\n* `P30D` are different intervals — so the projection reads each field with\n* `date_part` and assembles them rather than reducing the value to an epoch,\n* which would have to choose a length for a month. `IntervalStyle` decides how\n* PostgreSQL spells an interval and cannot be bound per expression, so the\n* spelling is constructed here instead of inherited.\n*\n* `concat` drops NULL arguments, so a zero component is omitted by rendering as\n* NULL; the seconds field is taken through `numeric` because a `double\n* precision` microsecond renders in scientific notation.\n*\n* That same NULL-dropping is why the whole assembly sits under an explicit NULL\n* check: for a NULL interval every field is NULL, `concat` yields `'P'`, and the\n* zero-duration fallback below would report an absent value as a zero one.\n*/\nconst isoDurationJsonProjection = (expression) => {\n\tconst field = (name) => datePart(name, expression);\n\tconst seconds = CastExpr.as(field(\"second\"), \"numeric\");\n\tconst assembled = FunctionCallExpr.of(\"concat\", [\n\t\tLiteralExpr.of(\"P\"),\n\t\twhenNonZero(field(\"year\"), FunctionCallExpr.of(\"concat\", [field(\"year\"), LiteralExpr.of(\"Y\")])),\n\t\twhenNonZero(field(\"month\"), FunctionCallExpr.of(\"concat\", [field(\"month\"), LiteralExpr.of(\"M\")])),\n\t\twhenNonZero(field(\"day\"), FunctionCallExpr.of(\"concat\", [field(\"day\"), LiteralExpr.of(\"D\")])),\n\t\tCaseExpr.of([{\n\t\t\tcondition: OrExpr.of([\n\t\t\t\tBinaryExpr.neq(field(\"hour\"), LiteralExpr.of(0)),\n\t\t\t\tBinaryExpr.neq(field(\"minute\"), LiteralExpr.of(0)),\n\t\t\t\tBinaryExpr.neq(field(\"second\"), LiteralExpr.of(0))\n\t\t\t]),\n\t\t\tvalue: LiteralExpr.of(\"T\")\n\t\t}], LiteralExpr.of(null)),\n\t\twhenNonZero(field(\"hour\"), FunctionCallExpr.of(\"concat\", [field(\"hour\"), LiteralExpr.of(\"H\")])),\n\t\twhenNonZero(field(\"minute\"), FunctionCallExpr.of(\"concat\", [field(\"minute\"), LiteralExpr.of(\"M\")])),\n\t\twhenNonZero(field(\"second\"), FunctionCallExpr.of(\"concat\", [seconds, LiteralExpr.of(\"S\")]))\n\t]);\n\treturn CaseExpr.of([{\n\t\tcondition: NullCheckExpr.isNull(expression),\n\t\tvalue: LiteralExpr.of(null)\n\t}], FunctionCallExpr.of(\"coalesce\", [FunctionCallExpr.of(\"nullif\", [assembled, LiteralExpr.of(\"P\")]), LiteralExpr.of(\"PT0S\")]));\n};\nconst postgresSqlCharDescriptor = postgresCodec(sqlCharDescriptor, {\n\tdataType: pgChar,\n\tjsonProjection: unpaddedCharJsonProjection,\n\tfactory: (descriptor, params) => () => new PgCharCodec(descriptor, params.length)\n});\nconst postgresSqlVarcharDescriptor = postgresCodec(sqlVarcharDescriptor, {\n\tdataType: pgVarchar,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, params) => () => new PgVarcharCodec(descriptor, params.length)\n});\nconst postgresSqlIntDescriptor = postgresCodec(sqlIntDescriptor, {\n\tdataType: pgInt4,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor) => () => new PgIntCodec(descriptor)\n});\nconst postgresSqlFloatDescriptor = postgresCodec(sqlFloatDescriptor, {\n\tdataType: pgFloat8,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor) => () => new PgFloatCodec(descriptor)\n});\nconst postgresSqlTextDescriptor = postgresCodec(sqlTextDescriptor, {\n\tdataType: pgText,\n\tjsonProjection: identityJsonProjection\n});\nvar PgTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(PG_TEXT_CODEC_ID, json);\n\t}\n};\nvar PgTextDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgText.id;\n\tcodecId = PG_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgTextCodec(this);\n\t}\n};\nconst pgTextDescriptor = new PgTextDescriptor();\nconst pgTextColumn = () => column(pgTextDescriptor.factory(), pgTextDescriptor.codecId, void 0);\n/**\n* Codec for a `pg.enum(Ref)` column bound to a native Postgres enum type.\n* Text passthrough, identical to `pg/text@1` — encode/decode do not carry the\n* enum's member values; membership is enforced by the native type itself, not\n* by this codec. `renderValueLiteral` renders a member value as its TS\n* literal, which is what drives the column's typed value-union (via\n* `renderValueSetType` reading the column's `valueSet` ref) — the codec\n* itself carries no params of its own; typing comes entirely from the\n* column's value-set, not from `pg/enum@1`.\n*\n* A distinct codec id (rather than reusing `pg/text@1` on a plain text\n* column) keeps native-enum columns independently identifiable — from a\n* column's `codecId` alone, without also inspecting its data type — which\n* the managed (DDL) phase needs to target `CREATE TYPE`/`ALTER TYPE`\n* operations at exactly the columns that use one.\n*\n* Not `textual`, although its values are strings: Postgres has no `LIKE`,\n* `ILIKE` or `to_tsvector` over an enum type.\n*/\nvar PgEnumCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(PG_ENUM_CODEC_ID, json);\n\t}\n};\n/**\n* Narrows codec `typeParams` to {@link PgEnumParams} — the shape that binds a\n* column to a named database type (a native enum's `CREATE TYPE` name).\n*/\nfunction isPgEnumParams(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && \"typeName\" in value && typeof value.typeName === \"string\";\n}\nvar PgEnumDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgEnum.id;\n\tcodecId = PG_ENUM_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgEnumParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgEnumCodec(this);\n\t}\n\t/**\n\t* Authoring-time hook a `pg.enum(<ref>)` type constructor calls once it has\n\t* resolved its ref argument to the referenced `native_enum` entity:\n\t* produces this codec's per-column `typeParams` from the entity's bare type\n\t* name. Schema-qualification (`auth.aal_level` for a\n\t* named non-default schema) is not this hook's concern — the field's\n\t* namespace isn't known at this call site for every authoring path (the TS\n\t* builder resolves a column before it knows its model's namespace), so it is\n\t* applied later, at contract construction, by {@link qualifyNativeType} via\n\t* the target's `authoring.qualifyColumnType` hook. Returns `undefined` if `entity` is not a `PostgresNativeEnum` (a\n\t* contributor bug, not a user-schema error — the caller decides how to\n\t* report it).\n\t*/\n\tcolumnFromEntity(entity) {\n\t\tif (!PostgresNativeEnum.is(entity)) return void 0;\n\t\treturn { typeParams: { typeName: entity.typeName } };\n\t}\n\t/**\n\t* Schema-qualifies this native enum type's name for the namespace the\n\t* consuming column lives in: `${namespaceId}.${typeName}` for a named\n\t* non-default schema, bare for the target's default schema (`public`) or\n\t* the late-bound unbound sentinel (whose schema `search_path` resolves at\n\t* runtime). Postgres's `format_type()` reports the bare name for a\n\t* public-schema type, so a public column's declared native type must stay\n\t* bare to match. Owned here because the codec owns its native type.\n\t*/\n\tqualifyNativeType(typeName, namespaceId) {\n\t\treturn namespaceId === \"public\" || namespaceId === UNBOUND_NAMESPACE_ID ? typeName : `${namespaceId}.${typeName}`;\n\t}\n};\nconst pgEnumDescriptor = new PgEnumDescriptor();\n/**\n* Contract-construction-time column-type qualifier the Postgres target\n* contributes through `authoring.qualifyColumnType`.\n* `buildSqlContractFromDefinition` calls this for every column as it is\n* constructed, passing the column's bare type info and its owning\n* `namespaceId`; a native-enum column (`pg/enum@1`) gets its type name\n* schema-qualified for that namespace (via\n* {@link PgEnumDescriptor.qualifyNativeType}), which rewrites only\n* `typeParams.typeName`. Every other codec passes through unchanged.\n* Both the PSL `pg.enum(Ref)` path and the TS `pg.enum(handle)` path route\n* through here — the dispatch keys off the codec id, not authoring surface.\n*/\nfunction postgresQualifyColumnType(input, namespaceId) {\n\tif (input.codecId !== \"pg/enum@1\") return input;\n\tconst bareTypeName = input.typeParams?.[\"typeName\"];\n\tif (typeof bareTypeName !== \"string\") return input;\n\tconst qualified = pgEnumDescriptor.qualifyNativeType(bareTypeName, namespaceId);\n\treturn { typeParams: {\n\t\t...input.typeParams,\n\t\ttypeName: qualified\n\t} };\n}\n/**\n* Postgres `text[]` control codec. Encode is an identity pass-through: the pg\n* wire driver serialises a JS `string[]` to a Postgres array literal under the\n* `$N::text[]` cast emitted from this codec's native type. Control-plane reads\n* that need semantic arrays parse raw array text before shared validation rather\n* than decoding this whole array value. Not a user-facing scalar — it is not\n* part of the authorable `CodecTypes` surface, only the runtime codec registry.\n*/\nvar PgTextArrayCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn [...value];\n\t}\n\t/** A `text[]` may hold NULL elements, which PostgreSQL writes as JSON `null`. */\n\tdecodeJson(json) {\n\t\tconst expected = \"an array of strings and nulls\";\n\t\tif (!Array.isArray(json)) return refuseJsonValue(PG_TEXT_ARRAY_CODEC_ID, expected, json);\n\t\tconst elements = [];\n\t\tfor (const entry of json) {\n\t\t\tif (entry !== null && typeof entry !== \"string\") return refuseJsonValue(PG_TEXT_ARRAY_CODEC_ID, expected, entry);\n\t\t\telements.push(entry);\n\t\t}\n\t\treturn elements;\n\t}\n};\nvar PgTextArrayDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgTextArray.id;\n\tcodecId = PG_TEXT_ARRAY_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgTextArrayCodec(this);\n\t}\n};\nconst pgTextArrayDescriptor = new PgTextArrayDescriptor();\nvar PgInt4Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(PG_INT4_CODEC_ID, json, INT32_RANGE);\n\t}\n};\nvar PgInt4Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInt4.id;\n\tcodecId = PG_INT4_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt4Codec(this);\n\t}\n};\nconst pgInt4Descriptor = new PgInt4Descriptor();\nconst pgInt4Column = () => column(pgInt4Descriptor.factory(), pgInt4Descriptor.codecId, void 0);\nvar PgInt2Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(PG_INT2_CODEC_ID, json, {\n\t\t\tmin: -32768,\n\t\t\tmax: 32767\n\t\t});\n\t}\n};\nvar PgInt2Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInt2.id;\n\tcodecId = PG_INT2_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt2Codec(this);\n\t}\n};\nconst pgInt2Descriptor = new PgInt2Descriptor();\nconst pgInt2Column = () => column(pgInt2Descriptor.factory(), pgInt2Descriptor.codecId, void 0);\n/**\n* A Postgres `int8` spans the full signed 64-bit range, which a JS `number`\n* cannot hold past 2^53. Application values are `bigint` and the canonical JSON\n* is decimal text; the wire form is the decimal string `pg` reads and writes for\n* this type.\n*/\nvar PgInt8Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgBigintEncode(PG_INT8_CODEC_ID, value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgInt8Decode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgBigintEncodeJson(PG_INT8_CODEC_ID, value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonIntegerText(PG_INT8_CODEC_ID, json, INT64_RANGE);\n\t}\n};\nvar PgInt8Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgInt8.id;\n\tcodecId = PG_INT8_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt8Codec(this);\n\t}\n};\nconst pgInt8Descriptor = new PgInt8Descriptor();\nconst pgInt8Column = () => column(pgInt8Descriptor.factory(), pgInt8Descriptor.codecId, void 0);\n/**\n* A Postgres `int8` decoded as a JS `number`, for columns whose values stay\n* within the safe integer range ±(2^53 − 1). Both directions guard rather than\n* round: decode (wire and JSON) and encode throw a structured error on\n* out-of-range or non-integral input. The canonical JSON is the decimal text\n* `pg/int8` carries, which every codec of that data type shares. The descriptor\n* claims no target type, so `int8` in type position stays `pg/int8@1`.\n*/\nvar PgInt8NumberCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgInt8NumberEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgInt8NumberDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgInt8NumberEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn pgInt8NumberDecodeJson(json);\n\t}\n};\nvar PgInt8NumberDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgInt8.id;\n\tcodecId = PG_INT8_NUMBER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgInt8NumberCodec(this);\n\t}\n};\nconst pgInt8NumberDescriptor = new PgInt8NumberDescriptor();\nconst pgInt8NumberColumn = () => column(pgInt8NumberDescriptor.factory(), pgInt8NumberDescriptor.codecId, void 0);\nvar PgFloat4Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgFloatEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn encodeJsonFloat(value);\n\t}\n\tdecodeJson(json) {\n\t\tconst value = decodeJsonFloat(PG_FLOAT4_CODEC_ID, json);\n\t\tif (Number.isFinite(value) && !fitsFloat4(value)) return refuseJsonValue(PG_FLOAT4_CODEC_ID, `a number float4 holds, at most ${FLOAT4_MAX} in magnitude and not so small that it becomes 0, or the text NaN, Infinity or -Infinity`, json);\n\t\treturn value;\n\t}\n};\nvar PgFloat4Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgFloat4.id;\n\tcodecId = PG_FLOAT4_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgFloat4Codec(this);\n\t}\n};\nconst pgFloat4Descriptor = new PgFloat4Descriptor();\nconst pgFloat4Column = () => column(pgFloat4Descriptor.factory(), pgFloat4Descriptor.codecId, void 0);\nvar PgFloat8Codec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgFloatEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn encodeJsonFloat(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonFloat(PG_FLOAT8_CODEC_ID, json);\n\t}\n};\nvar PgFloat8Descriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgFloat8.id;\n\tcodecId = PG_FLOAT8_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgFloat8Codec(this);\n\t}\n};\nconst pgFloat8Descriptor = new PgFloat8Descriptor();\nconst pgFloat8Column = () => column(pgFloat8Descriptor.factory(), pgFloat8Descriptor.codecId, void 0);\nvar PgBoolCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresBooleanWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonBoolean(PG_BOOL_CODEC_ID, json);\n\t}\n};\nvar PgBoolDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgBool.id;\n\tcodecId = PG_BOOL_CODEC_ID;\n\ttraits = [\"equality\", \"boolean\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgBoolCodec(this);\n\t}\n};\nconst pgBoolDescriptor = new PgBoolDescriptor();\nconst pgBoolColumn = () => column(pgBoolDescriptor.factory(), pgBoolDescriptor.codecId, void 0);\nvar PgNumericCodec = class extends CodecImpl {\n\tparams;\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgNumericDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\tif (!isCanonicalNumericText(value)) throw postgresError(\"RUNTIME.ENCODE_FAILED\", \"pg/numeric@1 application value must be canonical numeric text: an optionally negated decimal numeral, or NaN, Infinity or -Infinity\", { meta: {\n\t\t\tcodecId: PG_NUMERIC_CODEC_ID,\n\t\t\treceived: value\n\t\t} });\n\t\treturn value;\n\t}\n\tconstructor(descriptor, params) {\n\t\tsuper(descriptor);\n\t\tthis.params = params;\n\t}\n\tdecodeJson(json) {\n\t\tconst text = decodeJsonMatching(PG_NUMERIC_CODEC_ID, json, CANONICAL_NUMERIC_TEXT, \"a decimal string\");\n\t\tconst { precision } = this.params;\n\t\tif (precision === void 0) return text;\n\t\tconst scale = this.params.scale ?? 0;\n\t\tif (!fitsNumeric(text, precision, scale)) return refuseJsonValue(PG_NUMERIC_CODEC_ID, `a decimal string that numeric(${precision}, ${scale}) stores without rounding`, json);\n\t\treturn text;\n\t}\n};\nvar PgNumericDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgNumeric.id;\n\tcodecId = PG_NUMERIC_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = pgNumericParams;\n\trenderOutputType(params) {\n\t\treturn pgNumericRenderOutputType(params);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgNumericCodec(this, params ?? {});\n\t}\n};\nconst pgNumericDescriptor = new PgNumericDescriptor();\nconst pgNumericColumn = (params = {}) => column(pgNumericDescriptor.factory(params), pgNumericDescriptor.codecId, params);\n/**\n* A genuinely unbounded integer over unconstrained Postgres `numeric` storage.\n* Application values are `bigint` and the canonical JSON is decimal text, like\n* `pg/int8@1`; decode rejects non-integral values. The descriptor claims no\n* target type, so `numeric` and `decimal` in type position stay `pg/numeric@1`.\n*/\nvar PgUnboundedIntCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgBigintEncode(PG_UNBOUNDED_INT_CODEC_ID, value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgUnboundedIntDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgBigintEncodeJson(PG_UNBOUNDED_INT_CODEC_ID, value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonIntegerText(PG_UNBOUNDED_INT_CODEC_ID, json);\n\t}\n};\nvar PgUnboundedIntDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tdataType = pgNumeric.id;\n\tcodecId = PG_UNBOUNDED_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = pgNumericParams;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgUnboundedIntCodec(this);\n\t}\n};\nconst pgUnboundedIntDescriptor = new PgUnboundedIntDescriptor();\nconst pgUnboundedIntColumn = () => column(pgUnboundedIntDescriptor.factory(), pgUnboundedIntDescriptor.codecId, void 0);\nvar PgTimetzCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn pgTimetzCanonical(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonDateTimeText(PG_TIMETZ_CODEC_ID, json, pgTimetzStoredText);\n\t}\n};\nvar PgTimetzDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgTimetz.id;\n\tcodecId = PG_TIMETZ_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"Timetz\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgTimetzCodec(this);\n\t}\n};\nconst pgTimetzDescriptor = new PgTimetzDescriptor();\nconst pgTimetzColumn = (params = {}) => column(pgTimetzDescriptor.factory(params), pgTimetzDescriptor.codecId, params);\nvar PgBitCodec = class extends CodecImpl {\n\tlength;\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length;\n\t}\n\tdecodeJson(json) {\n\t\tconst bits = decodeJsonMatching(PG_BIT_CODEC_ID, json, BIT_STRING, \"a string of 0 and 1 digits\");\n\t\tif (bits.length !== this.length) return refuseJsonValue(PG_BIT_CODEC_ID, `a string of exactly ${counted(this.length, \"bit\")}`, json);\n\t\treturn bits;\n\t}\n};\nvar PgBitDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgBit.id;\n\tcodecId = PG_BIT_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgBitLengthParams;\n\trenderOutputType(params) {\n\t\treturn renderLength(\"Bit\", params);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgBitCodec(this, params?.length ?? 1);\n\t}\n};\nconst pgBitDescriptor = new PgBitDescriptor();\nconst pgBitColumn = (params = {}) => column(pgBitDescriptor.factory(params), pgBitDescriptor.codecId, params);\nvar PgVarbitCodec = class extends CodecImpl {\n\tlength;\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length;\n\t}\n\tdecodeJson(json) {\n\t\tconst bits = decodeJsonMatching(PG_VARBIT_CODEC_ID, json, BIT_STRING, \"a string of 0 and 1 digits\");\n\t\tif (this.length !== void 0 && bits.length > this.length) return refuseJsonValue(PG_VARBIT_CODEC_ID, `a string of at most ${counted(this.length, \"bit\")}`, json);\n\t\treturn bits;\n\t}\n};\nvar PgVarbitDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgVarbit.id;\n\tcodecId = PG_VARBIT_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgBitLengthParams;\n\trenderOutputType(params) {\n\t\treturn renderLength(\"VarBit\", params);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgVarbitCodec(this, params?.length);\n\t}\n};\nconst pgVarbitDescriptor = new PgVarbitDescriptor();\nconst pgVarbitColumn = (params = {}) => column(pgVarbitDescriptor.factory(params), pgVarbitDescriptor.codecId, params);\nvar PgByteaCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgByteaDecodeWire(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgByteaEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn pgByteaDecodeJson(json);\n\t}\n};\nvar PgByteaDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn base64JsonProjection(expression);\n\t}\n\tdataType = pgBytea.id;\n\tcodecId = PG_BYTEA_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgByteaCodec(this);\n\t}\n};\nconst pgByteaDescriptor = new PgByteaDescriptor();\nvar PgUuidCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn canonicalUuid(value) ?? value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonMatching(PG_UUID_CODEC_ID, json, CANONICAL_UUID, \"a UUID as PostgreSQL writes it, in lower case and hyphenated 8-4-4-4-12\");\n\t}\n};\nvar PgUuidDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgUuid.id;\n\tcodecId = PG_UUID_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgUuidCodec(this);\n\t}\n};\nconst pgUuidDescriptor = new PgUuidDescriptor();\nconst pgUuidColumn = () => column(pgUuidDescriptor.factory(), pgUuidDescriptor.codecId, void 0);\nvar PgInetCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(PG_INET_CODEC_ID, json);\n\t}\n};\nvar PgInetDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInet.id;\n\tcodecId = PG_INET_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgInetCodec(this);\n\t}\n};\nconst pgInetDescriptor = new PgInetDescriptor();\nconst pgInetColumn = () => column(pgInetDescriptor.factory(), pgInetDescriptor.codecId, void 0);\nvar PgTsqueryCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn blindCast(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn blindCast(decodeJsonString(PG_TSQUERY_CODEC_ID, json));\n\t}\n};\n/**\n* The type of a full-text query: what the parsers and the tag in `full-text` return, and what a\n* `tsquery` value read back from a query binds as when passed to `fullTextMatches`, `fullTextRank`\n* or `fullTextHeadline`. It has no column helper, because a contract cannot author a `tsquery`\n* column, and no traits, because comparing or ordering queries means nothing to an application.\n*/\nvar PgTsqueryDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgTsquery.id;\n\tcodecId = PG_TSQUERY_CODEC_ID;\n\ttraits = [];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgTsqueryCodec(this);\n\t}\n};\nconst pgTsqueryDescriptor = new PgTsqueryDescriptor();\n/**\n* An application value is a {@link PgInterval} — the three fields PostgreSQL\n* actually stores, `{ months, days, micros }` — and its canonical JSON is the\n* ISO-8601 duration string PostgreSQL spells under\n* `IntervalStyle = 'iso_8601'`: `P1M`, `P30D`, `P1Y2M3DT4H5M6S`, `PT0S` for\n* zero, each component carrying its own sign.\n*\n* Value and representation are independent here, as they are for `pg/bytea@1`\n* (`Uint8Array` carried as base64) and `pg/int8@1` (`bigint` carried as decimal\n* text). Reading an interval hands back numbers to compute with rather than a\n* string to parse; writing one takes the same numbers.\n*\n* The fields stay independent because a month has no fixed length: `{months: 1}`\n* and `{days: 30}` are different values and neither converts to the other. The\n* ISO rendering normalises only in its own spelling — twelve months render as a\n* year — so `{months: 13}` renders `P1Y1M` and reads back as `{months: 13}`.\n*/\nvar PgIntervalCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgIntervalToIso(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgIntervalDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn pgIntervalEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn pgIntervalDecodeJson(json);\n\t}\n};\nvar PgIntervalDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn isoDurationJsonProjection(expression);\n\t}\n\tdataType = pgInterval.id;\n\tcodecId = PG_INTERVAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = pgPrecisionParams;\n\trenderOutputType(params) {\n\t\treturn renderPrecision(\"Interval\", params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new PgIntervalCodec(this);\n\t}\n};\nconst pgIntervalDescriptor = new PgIntervalDescriptor();\nconst pgIntervalColumn = (params = {}) => column(pgIntervalDescriptor.factory(params), pgIntervalDescriptor.codecId, params);\nvar PgJsonCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgJsonEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgJsonDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar PgJsonDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgJson.id;\n\tcodecId = PG_JSON_CODEC_ID;\n\ttraits = [];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgJsonCodec(this);\n\t}\n};\nconst pgJsonDescriptor = new PgJsonDescriptor();\nconst pgJsonColumn = () => column(pgJsonDescriptor.factory(), pgJsonDescriptor.codecId, void 0);\nvar PgJsonbCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn pgJsonbEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn pgJsonbDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar PgJsonbDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgJsonb.id;\n\tcodecId = PG_JSONB_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new PgJsonbCodec(this);\n\t}\n};\nconst pgJsonbDescriptor = new PgJsonbDescriptor();\nconst pgJsonbColumn = () => column(pgJsonbDescriptor.factory(), pgJsonbDescriptor.codecId, void 0);\nvar PgIntCodec = class extends SqlIntCodec {\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(this.id, json, INT32_RANGE);\n\t}\n};\n/**\n* `sql/char@1` as PostgreSQL stores it: a `character` column holds its length in characters, and one with no length is `character(1)`.\n*/\nvar PgCharCodec = class extends SqlCharCodec {\n\tlength;\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length ?? 1;\n\t}\n\tdecodeJson(json) {\n\t\tif (!fitsCharacterLength(decodeJsonString(this.id, json), this.length, true)) return refuseJsonValue(this.id, `a string of at most ${counted(this.length, \"character\")} before any trailing spaces`, json);\n\t\treturn super.decodeJson(json);\n\t}\n};\n/** `sql/varchar@1` as PostgreSQL stores it: a `character varying` column with a length holds at most that many characters. */\nvar PgVarcharCodec = class extends SqlVarcharCodec {\n\tlength;\n\tconstructor(descriptor, length) {\n\t\tsuper(descriptor);\n\t\tthis.length = length;\n\t}\n\tdecodeJson(json) {\n\t\tconst text = super.decodeJson(json);\n\t\tif (this.length !== void 0 && !fitsCharacterLength(text, this.length, false)) return refuseJsonValue(this.id, `a string of at most ${counted(this.length, \"character\")}`, json);\n\t\treturn text;\n\t}\n};\nvar PgFloatCodec = class extends SqlFloatCodec {\n\tasync decode(wire, _ctx) {\n\t\treturn decodePostgresNumberWire(wire);\n\t}\n};\nvar PgCharDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn unpaddedCharJsonProjection(expression);\n\t}\n\tdataType = pgChar.id;\n\tcodecId = PG_CHAR_CODEC_ID;\n\ttraits = sqlCharDescriptor.traits;\n\tparamsSchema = pgCharacterLengthParams;\n\trenderOutputType(params) {\n\t\treturn sqlCharDescriptor.renderOutputType(params);\n\t}\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgCharCodec(this, params?.length);\n\t}\n};\nconst pgCharDescriptor = new PgCharDescriptor();\nconst pgCharColumn = (params = {}) => column(pgCharDescriptor.factory(params), pgCharDescriptor.codecId, params);\nvar PgVarcharDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgVarchar.id;\n\tcodecId = PG_VARCHAR_CODEC_ID;\n\ttraits = sqlVarcharDescriptor.traits;\n\tparamsSchema = pgCharacterLengthParams;\n\trenderOutputType(params) {\n\t\treturn sqlVarcharDescriptor.renderOutputType(params);\n\t}\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory(params) {\n\t\treturn () => new PgVarcharCodec(this, params?.length);\n\t}\n};\nconst pgVarcharDescriptor = new PgVarcharDescriptor();\nconst pgVarcharColumn = (params = {}) => column(pgVarcharDescriptor.factory(params), pgVarcharDescriptor.codecId, params);\nvar PgIntDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgInt4.id;\n\tcodecId = PG_INT_CODEC_ID;\n\ttraits = sqlIntDescriptor.traits;\n\tparamsSchema = sqlIntDescriptor.paramsSchema;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgIntCodec(this);\n\t}\n};\nconst pgIntDescriptor = new PgIntDescriptor();\nconst pgIntColumn = () => column(pgIntDescriptor.factory(), pgIntDescriptor.codecId, void 0);\nvar PgFloatDescriptor = class extends PostgresCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tdataType = pgFloat8.id;\n\tcodecId = PG_FLOAT_CODEC_ID;\n\ttraits = sqlFloatDescriptor.traits;\n\tparamsSchema = sqlFloatDescriptor.paramsSchema;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new PgFloatCodec(this);\n\t}\n};\nconst pgFloatDescriptor = new PgFloatDescriptor();\nconst pgFloatColumn = () => column(pgFloatDescriptor.factory(), pgFloatDescriptor.codecId, void 0);\nconst codecDescriptors = definePostgresCodecs([\n\tpostgresSqlCharDescriptor,\n\tpostgresSqlVarcharDescriptor,\n\tpostgresSqlIntDescriptor,\n\tpostgresSqlFloatDescriptor,\n\tpostgresSqlTextDescriptor,\n\tpgTextDescriptor,\n\tpgEnumDescriptor,\n\tpgCharDescriptor,\n\tpgVarcharDescriptor,\n\tpgIntDescriptor,\n\tpgFloatDescriptor,\n\tpgInt4Descriptor,\n\tpgInt2Descriptor,\n\tpgInt8Descriptor,\n\tpgInt8NumberDescriptor,\n\tpgFloat4Descriptor,\n\tpgFloat8Descriptor,\n\tpgNumericDescriptor,\n\tpgUnboundedIntDescriptor,\n\tpgDateTemporalDescriptor,\n\tpgTimestampTemporalDescriptor,\n\tpgTimestamptzTemporalDescriptor,\n\tpgTimeTemporalDescriptor,\n\tpgDateStringDescriptor,\n\tpgTimestampStringDescriptor,\n\tpgTimestamptzStringDescriptor,\n\tpgTimestamptzDateDescriptor,\n\tpgTimeStringDescriptor,\n\tpgTimetzDescriptor,\n\tpgBoolDescriptor,\n\tpgBitDescriptor,\n\tpgVarbitDescriptor,\n\tpgByteaDescriptor,\n\tpgUuidDescriptor,\n\tpgInetDescriptor,\n\tpgIntervalDescriptor,\n\tpgJsonDescriptor,\n\tpgJsonbDescriptor,\n\tpgTextArrayDescriptor,\n\tpgTsqueryDescriptor\n]);\n//#endregion\nexport { pgTimestamptzDateDescriptor as A, pgUuidColumn as C, PgTimestamptzDateCodec as D, postgresQualifyColumnType as E, setFallbackTemporal as M, PgTimestamptzDateDescriptor as O, pgUnboundedIntColumn as S, pgVarcharColumn as T, pgJsonColumn as _, pgCharColumn as a, pgTextColumn as b, pgFloat8Column as c, pgInt2Column as d, pgInt4Column as f, pgIntervalColumn as g, pgIntColumn as h, pgBoolColumn as i, requireTemporal as j, pgTimestamptzDateColumn as k, pgFloatColumn as l, pgInt8NumberColumn as m, isPgEnumParams as n, pgEnumDescriptor as o, pgInt8Column as p, pgBitColumn as r, pgFloat4Column as s, codecDescriptors as t, pgInetColumn as u, pgJsonbColumn as v, pgVarbit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AACA,MAAM,kBAAkB,IAAI,gBAAgB;AAC5C,MAAM,oBAAoB,OAAO,gBAAgB,QAAQ,GAAG,gBAAgB,SAAS,KAAK,CAAC;AAC3F,IAAI,oBAAoB,cAAc,wBAAwB;CAC7D,eAAe,YAAY;EAC1B,OAAO;CACR;CACA,WAAW,SAAS;CACpB,UAAU;CACV,SAAS,mBAAmB;CAC5B,eAAe,mBAAmB;CAClC,mBAAmB,OAAO;EACzB,OAAO,gBAAgB,KAAK;CAC7B;CACA,UAAU;EACT,aAAa,IAAI,aAAa,IAAI;CACnC;AACD;AACA,MAAM,oBAAoB,IAAI,kBAAkB;AAChD,MAAM,sBAAsB,OAAO,kBAAkB,QAAQ,GAAG,kBAAkB,SAAS,KAAK,CAAC;AACjG,MAAM,mBAAmB,qBAAqB;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC"}
|
|
@@ -87,6 +87,23 @@ declare function columnDefaultAst(options: {
|
|
|
87
87
|
readonly table: string;
|
|
88
88
|
readonly column: string;
|
|
89
89
|
}): ColumnDefaultCheckBuilder;
|
|
90
|
+
/**
|
|
91
|
+
* Typed check that a column takes its default from a sequence attached to it: `pg_get_serial_sequence` finds a sequence owned by the column, and `information_schema.columns` shows a `nextval(` default. Either half alone holds after a default was dropped or replaced, so a setDefault that attaches a sequence checks both.
|
|
92
|
+
*/
|
|
93
|
+
declare function columnDefaultSequenceAst(options: {
|
|
94
|
+
readonly schema: string;
|
|
95
|
+
readonly table: string;
|
|
96
|
+
readonly column: string;
|
|
97
|
+
}): SelectAst;
|
|
98
|
+
/**
|
|
99
|
+
* Typed check that `sequence` is free for a column's autoincrement default: no relation has the name, or the relation that has it is the sequence the column already owns, left in place when its default was dropped.
|
|
100
|
+
*/
|
|
101
|
+
declare function sequenceNameAvailableAst(options: {
|
|
102
|
+
readonly schema: string;
|
|
103
|
+
readonly table: string;
|
|
104
|
+
readonly column: string;
|
|
105
|
+
readonly sequence: string;
|
|
106
|
+
}): SelectAst;
|
|
90
107
|
/**
|
|
91
108
|
* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`
|
|
92
109
|
* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`
|
|
@@ -255,5 +272,5 @@ declare function alterTable(options: {
|
|
|
255
272
|
readonly actions: readonly AnyAlterTableAction[];
|
|
256
273
|
}): PostgresAlterTable;
|
|
257
274
|
//#endregion
|
|
258
|
-
export {
|
|
259
|
-
//# sourceMappingURL=contract-free-
|
|
275
|
+
export { rlsEnabledAst as A, toRegclass as B, extensionExistsAst as C, jsonb as D, int8 as E, tablePrimaryKeyAst as F, text as I, textArray as L, sequenceNameAvailableAst as M, tableExistsAst as N, noNullValuesAst as O, tableIsEmptyAst as P, timestamptz as R, dropDefaultAction as S, int4 as T, columnNullabilityAst as _, IndexExistsCheckBuilder as a, createSchema as b, TableExistsCheckBuilder as c, alterTable as d, buildControlTableBootstrapQueries as f, columnExistsAst as g, columnDefaultSequenceAst as h, ExtensionExistsCheckBuilder as i, rlsPolicyExistsAst as j, pgTable as k, TablePrimaryKeyCheckBuilder as l, columnDefaultAst as m, ColumnExistsCheckBuilder as n, RlsEnabledCheckBuilder as o, buildSignMarkerBootstrapQueries as p, ConstraintExistsCheckBuilder as r, RlsPolicyExistsCheckBuilder as s, ColumnDefaultCheckBuilder as t, addColumnAction as u, columnTypeAst as v, indexExistsAst as w, createTable as x, constraintExistsAst as y, timestamptzJsDate as z };
|
|
276
|
+
//# sourceMappingURL=contract-free-DY8vDIxh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-free-DY8vDIxh.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.d.mts"],"mappings":";;;;;;;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;;iBAGhB,4CAA4C;iBAC5C,8CAA8C;;;;;;;;;;;;;;;;;iBAiB9C,YAAY;WAClB;WACA;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B;;;;;iBAKa,aAAa;WACnB;WACA;IACP;;;;;;iBAMa,gBAAgB,QAAQ,YAAY;;;;;iBAKpC,kBAAkB,qBAAqB;;;;;iBAKvC,WAAW;WACjB;WACA;WACA,kBAAkB;IACzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
|
|
2
|
-
import { l as PostgresTableSource } from "./postgres-schema-
|
|
3
|
-
import {
|
|
2
|
+
import { l as PostgresTableSource } from "./postgres-schema-AlEVkXXS-ZfXWYddl.mjs";
|
|
3
|
+
import { m as createTable, p as createSchema } from "./ddl-C_vTj7b5-vyGLBKLo.mjs";
|
|
4
4
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
5
5
|
import { col, fn, lit, table } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
6
6
|
//#region ../../../3-targets/3-targets/postgres/dist/contract-free.mjs
|
|
@@ -119,4 +119,4 @@ function buildControlTableBootstrapQueries() {
|
|
|
119
119
|
//#endregion
|
|
120
120
|
export { jsonb as a, textArray as c, int8 as i, timestamptz as l, buildSignMarkerBootstrapQueries as n, pgTable as o, int4 as r, text as s, buildControlTableBootstrapQueries as t, timestamptzJsDate as u };
|
|
121
121
|
|
|
122
|
-
//# sourceMappingURL=contract-free-
|
|
122
|
+
//# sourceMappingURL=contract-free-DaK6wmmo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-free-DaK6wmmo.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { u as PostgresTableSource } from \"./postgres-schema-AlEVkXXS.mjs\";\nimport { A as tableIsEmptyAst, D as rlsPolicyExistsAst, E as rlsEnabledAst, M as toRegclass, O as sequenceNameAvailableAst, S as indexExistsAst, T as noNullValuesAst, _ as columnExistsAst, b as constraintExistsAst, c as createTable, d as dropDefaultAction, g as columnDefaultSequenceAst, h as columnDefaultAst, i as alterTable, j as tablePrimaryKeyAst, k as tableExistsAst, s as createSchema, t as addColumnAction, v as columnNullabilityAst, x as extensionExistsAst, y as columnTypeAst } from \"./ddl-C_vTj7b5.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(PG_TEXT_CODEC_ID, opts);\nconst int4 = (opts) => desc(PG_INT4_CODEC_ID, opts);\nconst int8 = (opts) => desc(PG_INT8_CODEC_ID, opts);\nconst jsonb = (opts) => desc(PG_JSONB_CODEC_ID, opts);\nconst textArray = (opts) => ({\n\t...desc(PG_TEXT_CODEC_ID, opts),\n\tmany: true\n});\nconst timestamptz = (opts) => desc(PG_TIMESTAMPTZ_STRING_CODEC_ID, opts);\nconst timestamptzJsDate = (opts) => desc(PG_TIMESTAMPTZ_DATE_CODEC_ID, opts);\n/**\n* Declare a PostgreSQL control-plane table with a typed column schema. Wraps\n* the generic `table()` factory with a `PostgresTableSource` so the renderer\n* qualifies the table name with the optional schema prefix.\n*\n* ```ts\n* const marker = pgTable(\n* { name: 'marker', schema: 'prisma_contract' },\n* { space: text(), core_hash: text(), updated_at: timestamptz() },\n* );\n* ```\n*/\nfunction pgTable(source, columns) {\n\treturn table(new PostgresTableSource(source), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"text\", { notNull: true }),\n\tcol(\"profile_hash\", \"text\", { notNull: true }),\n\tcol(\"contract_json\", \"jsonb\"),\n\tcol(\"canonical_version\", \"int\"),\n\tcol(\"updated_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"app_tag\", \"text\"),\n\tcol(\"meta\", \"jsonb\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"text[]\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"bigserial\", { primaryKey: true }),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"space\", \"text\", { notNull: true }),\n\tcol(\"migration_name\", \"text\", { notNull: true }),\n\tcol(\"migration_hash\", \"text\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"text\"),\n\tcol(\"origin_profile_hash\", \"text\"),\n\tcol(\"destination_core_hash\", \"text\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"text\"),\n\tcol(\"operations\", \"jsonb\", { notNull: true })\n];\nconst contractColumns = [\n\tcol(\"core_hash\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true\n\t}),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"contract_json\", \"jsonb\", { notNull: true })\n];\nconst markerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nconst contractTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"contract\",\n\tifNotExists: true,\n\tcolumns: contractColumns\n});\nconst controlSchema = createSchema({\n\tschema: \"prisma_contract\",\n\tifNotExists: true\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [controlSchema, markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [\n\t\tcontrolSchema,\n\t\tmarkerTable,\n\t\tledgerTable,\n\t\tcontractTable\n\t];\n}\n//#endregion\nexport { PostgresTableSource, addColumnAction, alterTable, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, constraintExistsAst, createSchema, createTable, dropDefaultAction, extensionExistsAst, indexExistsAst, int4, int8, jsonb, noNullValuesAst, pgTable, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;;AAMA,MAAM,QAAQ,SAAS,UAAU;CAChC;CACA,UAAU,MAAM,YAAY;AAC7B;AACA,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,SAAS,SAAS,KAAK,mBAAmB,IAAI;AACpD,MAAM,aAAa,UAAU;CAC5B,GAAG,KAAK,kBAAkB,IAAI;CAC9B,MAAM;AACP;AACA,MAAM,eAAe,SAAS,KAAK,gCAAgC,IAAI;AACvE,MAAM,qBAAqB,SAAS,KA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,GAAG,OAAO;CACpB,CAAC;CACD,IAAI,iBAAiB,SAAS,EAAE,SAAS,KAAK,CAAC;AAChD;AACA,MAAM,cAAc,YAAY;CAC/B,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,cAAc,YAAY;CAC/B,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,YAAY;CACjC,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,aAAa;CAClC,QAAQ;CACR,aAAa;AACd,CAAC;AACD,SAAS,kCAAkC;CAC1C,OAAO,CAAC,eAAe,WAAW;AACnC;AACA,SAAS,oCAAoC;CAC5C,OAAO;EACN;EACA;EACA;EACA;CACD;AACD"}
|
|
@@ -2,20 +2,20 @@ import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID,
|
|
|
2
2
|
import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
3
3
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
|
|
4
4
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
|
|
5
|
-
import { M as setFallbackTemporal } from "./codecs-
|
|
6
|
-
import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-
|
|
5
|
+
import { M as setFallbackTemporal } from "./codecs-DelwJv6h-CFbyTJIJ.mjs";
|
|
6
|
+
import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-AlEVkXXS-ZfXWYddl.mjs";
|
|
7
7
|
import { n as computeContentHash } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
|
|
8
|
-
import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-
|
|
9
|
-
import { t as postgresRenderCheckExpressions } from "./check-expressions-
|
|
10
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
8
|
+
import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-vHbPLrW4-BsHR7gUE.mjs";
|
|
9
|
+
import { t as postgresRenderCheckExpressions } from "./check-expressions-Dlt334zg-CV5Vkh3G.mjs";
|
|
10
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-BgOMP4hF-CfUJsgjc.mjs";
|
|
11
11
|
import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
12
12
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
13
|
-
import { r as diffPostgresSchema } from "./diff-database-schema-
|
|
14
|
-
import { t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
15
|
-
import {
|
|
16
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
13
|
+
import { r as diffPostgresSchema } from "./diff-database-schema-zc7d2uxC-BVe8D7vG.mjs";
|
|
14
|
+
import { t as PostgresContractSerializer } from "./postgres-contract-view-B0KloSYp-Cbbl_pIv.mjs";
|
|
15
|
+
import { o as postgresContractToSchema } from "./postgres-migration-UVh2xeV0-DW8V_8aj.mjs";
|
|
16
|
+
import { t as createPostgresMigrationPlanner } from "./planner-ZmK0aNuY-Cak-8zwa.mjs";
|
|
17
17
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
|
|
18
|
-
import { a as buildIndexAttribute, c as buildNativeEnumBlock, d as createPostgresTypeMap, f as inferPostgresPslContract, g as positionalArg, h as parseDefaultAttributeString, i as buildCheckAttribute, n as SYNTHETIC_SPAN, o as buildMapAttribute, p as namedArg, r as buildAttribute, s as buildModelConstraintAttribute } from "./infer-psl-contract-
|
|
18
|
+
import { a as buildIndexAttribute, c as buildNativeEnumBlock, d as createPostgresTypeMap, f as inferPostgresPslContract, g as positionalArg, h as parseDefaultAttributeString, i as buildCheckAttribute, n as SYNTHETIC_SPAN, o as buildMapAttribute, p as namedArg, r as buildAttribute, s as buildModelConstraintAttribute } from "./infer-psl-contract-B5yExD61-Cmye68li.mjs";
|
|
19
19
|
import { requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
|
|
20
20
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
21
21
|
import { dataTypeParams, isSqlDataType, unquotedSqlBaseName } from "@prisma/orm-family-sql/contract/data-type";
|
|
@@ -2667,4 +2667,4 @@ const postgresTargetDescriptor = createPostgresTargetDescriptor();
|
|
|
2667
2667
|
//#endregion
|
|
2668
2668
|
export { postgresTargetDescriptor as i, postgresPslTypeConstructors as n, postgresScalarAuthoringTypes as r, postgresNativeAuthoringTypes as t };
|
|
2669
2669
|
|
|
2670
|
-
//# sourceMappingURL=control-
|
|
2670
|
+
//# sourceMappingURL=control-YKrabf1Q.mjs.map
|