@prisma/orm-target-postgres 8.0.0-rc.21-dev.6 → 8.0.0-rc.21-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-BIWKN0d7-B2BpKdVy.mjs → adapter-B84yJpi7-8wwdWq5R.mjs} +6 -6
- package/dist/{adapter-BIWKN0d7-B2BpKdVy.mjs.map → adapter-B84yJpi7-8wwdWq5R.mjs.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter.mjs +5 -5
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +1 -1
- package/dist/adapter__control.mjs +4 -4
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{authoring-DOlbnTzz-BWXtiq9i.mjs → authoring-Bm8PD9ls-clXbYDiN.mjs} +209 -48
- package/dist/authoring-Bm8PD9ls-clXbYDiN.mjs.map +1 -0
- package/dist/{autoincrement-widths-D7Uub-uA-DccZpX6Q.mjs → autoincrement-widths-DkD24r-C-D4O96GJZ.mjs} +3 -3
- package/dist/{autoincrement-widths-D7Uub-uA-DccZpX6Q.mjs.map → autoincrement-widths-DkD24r-C-D4O96GJZ.mjs.map} +1 -1
- package/dist/{check-expressions-CCFJKC7N-DHEJIG2S.mjs → check-expressions-C_lM7sSK-Dtv6p3hg.mjs} +3 -3
- package/dist/{check-expressions-CCFJKC7N-DHEJIG2S.mjs.map → check-expressions-C_lM7sSK-Dtv6p3hg.mjs.map} +1 -1
- package/dist/{codec-registry-qdVGkdp_-DCI2nWSt.mjs → codec-registry-DVjibYBY-BeOUp5fk.mjs} +4 -4
- package/dist/{codec-registry-qdVGkdp_-DCI2nWSt.mjs.map → codec-registry-DVjibYBY-BeOUp5fk.mjs.map} +1 -1
- package/dist/{codecs-BcYLh1iB-Dxi2UgkJ.mjs → codecs-BqCmavY8-CC-ZbbTA.mjs} +12 -5
- package/dist/codecs-BqCmavY8-CC-ZbbTA.mjs.map +1 -0
- package/dist/{contract-contributions-DTGGTwRZ-BmYIo6M5.mjs → contract-contributions-rxCSM_1W-d9oohAzB.mjs} +16 -41
- package/dist/contract-contributions-rxCSM_1W-d9oohAzB.mjs.map +1 -0
- package/dist/{contract-free-Bjx-Ktot.mjs → contract-free-BrY8qnvY.mjs} +3 -3
- package/dist/{contract-free-Bjx-Ktot.mjs.map → contract-free-BrY8qnvY.mjs.map} +1 -1
- package/dist/{control-policy-B1Zvw6VN-DN4QDwpc.mjs → control-policy-BncmQ6LO-B8SXRfP_.mjs} +9 -9
- package/dist/{control-policy-B1Zvw6VN-DN4QDwpc.mjs.map → control-policy-BncmQ6LO-B8SXRfP_.mjs.map} +1 -1
- package/dist/{control-m9LWRUnY.d.mts → control-s1_5W_8t.d.mts} +179 -74
- package/dist/control-s1_5W_8t.d.mts.map +1 -0
- package/dist/{data-type-entries-DhUYJbVb-4NUH6vR_.mjs → data-type-entries-ZHPz2h_f-CNUmPGgf.mjs} +3 -3
- package/dist/{data-type-entries-DhUYJbVb-4NUH6vR_.mjs.map → data-type-entries-ZHPz2h_f-CNUmPGgf.mjs.map} +1 -1
- package/dist/{data-types-B7S_CHZd-C9JA40Ir.mjs → data-types-DklKHVmp-Bl-nwUa-.mjs} +21 -4
- package/dist/data-types-DklKHVmp-Bl-nwUa-.mjs.map +1 -0
- package/dist/{date-time-now-generators-C2aktlrc-uf9LqU6E.d.mts → date-time-now-generators-BZj5G1E3-BylrCrgW.d.mts} +4 -4
- package/dist/date-time-now-generators-BZj5G1E3-BylrCrgW.d.mts.map +1 -0
- package/dist/{date-time-now-generators-BrJ1cMzo-CxURsw2O.mjs → date-time-now-generators-Cc4PvFeB-XQWJz_4f.mjs} +21 -11
- package/dist/date-time-now-generators-Cc4PvFeB-XQWJz_4f.mjs.map +1 -0
- package/dist/{ddl-DiUFjVZe-DETlNlJh.mjs → ddl-LpR9foVX-YBmyKx74.mjs} +3 -3
- package/dist/{ddl-DiUFjVZe-DETlNlJh.mjs.map → ddl-LpR9foVX-YBmyKx74.mjs.map} +1 -1
- package/dist/{descriptor-meta-CGRsMMdO-tQxNSE_j.mjs → descriptor-meta-C2F_xt0P-D7gfqNS0.mjs} +17 -12
- package/dist/descriptor-meta-C2F_xt0P-D7gfqNS0.mjs.map +1 -0
- package/dist/{descriptor-meta-I7Ih-0hE-CrOjEir4.mjs → descriptor-meta-C2YuDfV8-B_u19j25.mjs} +4 -4
- package/dist/{descriptor-meta-I7Ih-0hE-CrOjEir4.mjs.map → descriptor-meta-C2YuDfV8-B_u19j25.mjs.map} +1 -1
- package/dist/{diff-database-schema-ASDRsuei-3Yro3-Tw.mjs → diff-database-schema-CcR7BN-A-BuftnIR2.mjs} +9 -9
- package/dist/{diff-database-schema-ASDRsuei-3Yro3-Tw.mjs.map → diff-database-schema-CcR7BN-A-BuftnIR2.mjs.map} +1 -1
- package/dist/{errors-Di_apgWJ-BLXRTfFj.mjs → errors-DG6xgXgr-Cb1XcPcb.mjs} +6 -5
- package/dist/errors-DG6xgXgr-Cb1XcPcb.mjs.map +1 -0
- package/dist/{full-text-CcHf5wkL.mjs → full-text-7szWl7EC.mjs} +3 -3
- package/dist/{full-text-CcHf5wkL.mjs.map → full-text-7szWl7EC.mjs.map} +1 -1
- package/dist/{full-text-index-definition-B0kQDs_M-8N6Slj3l.mjs → full-text-index-definition-BRNRSgZK-l_2TBarg.mjs} +3 -3
- package/dist/{full-text-index-definition-B0kQDs_M-8N6Slj3l.mjs.map → full-text-index-definition-BRNRSgZK-l_2TBarg.mjs.map} +1 -1
- package/dist/{full-text-parsers-hI_qtk-Q-DqTMF4n2.mjs → full-text-parsers-Dd5DOdBA-BTeOSzUj.mjs} +4 -4
- package/dist/{full-text-parsers-hI_qtk-Q-DqTMF4n2.mjs.map → full-text-parsers-Dd5DOdBA-BTeOSzUj.mjs.map} +1 -1
- package/dist/{full-text-search-document-7AKd6oOw-S-rsh3SZ.mjs → full-text-search-document-DWzECXD--BqrLGXsX.mjs} +5 -5
- package/dist/{full-text-search-document-7AKd6oOw-S-rsh3SZ.mjs.map → full-text-search-document-DWzECXD--BqrLGXsX.mjs.map} +1 -1
- package/dist/{index-types-DfnDGeQU-BWcrd_SP.mjs → index-types-5g7gXoWK-CBvkTIbr.mjs} +3 -3
- package/dist/{index-types-DfnDGeQU-BWcrd_SP.mjs.map → index-types-5g7gXoWK-CBvkTIbr.mjs.map} +1 -1
- package/dist/{infer-psl-contract-BZnLgJj6-EjqMFHxE.mjs → infer-psl-contract-CT9H9Xnw-l2pNPAyO.mjs} +70 -17
- package/dist/infer-psl-contract-CT9H9Xnw-l2pNPAyO.mjs.map +1 -0
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{native-type-normalizer-BpTZ6sm1.mjs → native-type-normalizer-DgHcQkwl.mjs} +2 -2
- package/dist/{native-type-normalizer-BpTZ6sm1.mjs.map → native-type-normalizer-DgHcQkwl.mjs.map} +1 -1
- package/dist/{op-factory-call-CUu2s6l7-CaAVzTwP.mjs → op-factory-call-BRaCqnFh-avSVdAgI.mjs} +8 -8
- package/dist/{op-factory-call-CUu2s6l7-CaAVzTwP.mjs.map → op-factory-call-BRaCqnFh-avSVdAgI.mjs.map} +1 -1
- package/dist/{pack-DKR4BRIY.d.mts → pack-BtgCVVid.d.mts} +184 -100
- package/dist/pack-BtgCVVid.d.mts.map +1 -0
- package/dist/{planner-C69ALB15-CasiGSdJ.mjs → planner-BsLpyYHC-IEpACcdS.mjs} +10 -10
- package/dist/{planner-C69ALB15-CasiGSdJ.mjs.map → planner-BsLpyYHC-IEpACcdS.mjs.map} +1 -1
- package/dist/{planner-ddl-builders-BHvruDX3-Sw7yWuWE.mjs → planner-ddl-builders-Dmr6ph8i-5FWxE6Wu.mjs} +3 -3
- package/dist/{planner-ddl-builders-BHvruDX3-Sw7yWuWE.mjs.map → planner-ddl-builders-Dmr6ph8i-5FWxE6Wu.mjs.map} +1 -1
- package/dist/{planner-identity-values-Cp0Cvrg7-BxMk9Qaf.mjs → planner-identity-values-BwYhwYeo-CaSwyXgC.mjs} +3 -3
- package/dist/{planner-identity-values-Cp0Cvrg7-BxMk9Qaf.mjs.map → planner-identity-values-BwYhwYeo-CaSwyXgC.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-BGo--l2b-ww24WTkY.mjs → planner-produced-postgres-migration-CU7D_5IE-Cv-o4-Hh.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-BGo--l2b-ww24WTkY.mjs.map → planner-produced-postgres-migration-CU7D_5IE-Cv-o4-Hh.mjs.map} +1 -1
- package/dist/{planner-sql-checks-Dhx-R5GJ-GyHfROia.mjs → planner-sql-checks-DOGD6v7y-BWkRMsXt.mjs} +19 -10
- package/dist/{planner-sql-checks-Dhx-R5GJ-GyHfROia.mjs.map → planner-sql-checks-DOGD6v7y-BWkRMsXt.mjs.map} +1 -1
- package/dist/{postgres-codec-traits-Cpq3LqzZ-D_WitJjX.mjs → postgres-codec-traits-BhLP9ipO-D5kVsAxr.mjs} +3 -3
- package/dist/{postgres-codec-traits-Cpq3LqzZ-D_WitJjX.mjs.map → postgres-codec-traits-BhLP9ipO-D5kVsAxr.mjs.map} +1 -1
- package/dist/{postgres-contract-view-CvoOn_Xj-Dr0DQlVT.mjs → postgres-contract-view-DBmVHV5m-DDZR3cBh.mjs} +8 -8
- package/dist/{postgres-contract-view-CvoOn_Xj-Dr0DQlVT.mjs.map → postgres-contract-view-DBmVHV5m-DDZR3cBh.mjs.map} +1 -1
- package/dist/{postgres-migration-69O9MUBt-BQ1_mj4S.mjs → postgres-migration-DrLpuKus-DOU9Rbkb.mjs} +11 -11
- package/dist/{postgres-migration-69O9MUBt-BQ1_mj4S.mjs.map → postgres-migration-DrLpuKus-DOU9Rbkb.mjs.map} +1 -1
- package/dist/{postgres-schema-CNNW8eA3-CwosQz5e.mjs → postgres-schema-CEGf780E-cyGo2Sii.mjs} +4 -4
- package/dist/{postgres-schema-CNNW8eA3-CwosQz5e.mjs.map → postgres-schema-CEGf780E-cyGo2Sii.mjs.map} +1 -1
- package/dist/{prisma7-binding-DFb9yHdO.d.mts → prisma7-binding-0UXq-q2N.d.mts} +191 -100
- package/dist/prisma7-binding-0UXq-q2N.d.mts.map +1 -0
- package/dist/{prisma7-binding-CcrXBBbM.mjs → prisma7-binding-BvvPWMwt.mjs} +27 -9
- package/dist/prisma7-binding-BvvPWMwt.mjs.map +1 -0
- package/dist/{render-ops-Dr6RDk6z-CSGJsR6N.mjs → render-ops-CbRkpwwx-C6wSWcTl.mjs} +4 -4
- package/dist/{render-ops-Dr6RDk6z-CSGJsR6N.mjs.map → render-ops-CbRkpwwx-C6wSWcTl.mjs.map} +1 -1
- package/dist/{resolve-ddl-schema-p68Q5F1u-DZAQNXpi.mjs → resolve-ddl-schema-BhOYD95_-DhUQYNLi.mjs} +3 -3
- package/dist/{resolve-ddl-schema-p68Q5F1u-DZAQNXpi.mjs.map → resolve-ddl-schema-BhOYD95_-DhUQYNLi.mjs.map} +1 -1
- package/dist/{runtime-DGgnFCG7.d.mts → runtime-BbPgK4gH.d.mts} +2 -2
- package/dist/{runtime-DGgnFCG7.d.mts.map → runtime-BbPgK4gH.d.mts.map} +1 -1
- package/dist/{sql-renderer-BdWJPa5F-DUvahuXZ.mjs → sql-renderer-BdWJPa5F-B8cdiqmK.mjs} +3 -3
- package/dist/{sql-renderer-BdWJPa5F-DUvahuXZ.mjs.map → sql-renderer-BdWJPa5F-B8cdiqmK.mjs.map} +1 -1
- package/dist/{sql-utils-CnnGiZBc.d.mts → sql-utils-Bq4nuPvy.d.mts} +6 -2
- package/dist/{sql-utils-CnnGiZBc.d.mts.map → sql-utils-Bq4nuPvy.d.mts.map} +1 -1
- package/dist/{sql-utils-0j_6QstU-DAfnt5Mu.mjs → sql-utils-ylvfJ1RJ-03xGdSLI.mjs} +34 -4
- package/dist/sql-utils-ylvfJ1RJ-03xGdSLI.mjs.map +1 -0
- package/dist/target.d.mts +7 -7
- package/dist/target.mjs +32 -32
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +38 -25
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__errors.mjs +1 -1
- package/dist/target__full-text-index-authoring.mjs +2 -2
- package/dist/target__full-text.mjs +2 -2
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__native-type-normalizer.mjs +1 -1
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.d.mts +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__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +7 -7
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.d.mts +2 -2
- package/dist/target__sql-utils.mjs +4 -4
- package/dist/target__types.mjs +2 -2
- package/package.json +9 -9
- package/dist/authoring-DOlbnTzz-BWXtiq9i.mjs.map +0 -1
- package/dist/codecs-BcYLh1iB-Dxi2UgkJ.mjs.map +0 -1
- package/dist/contract-contributions-DTGGTwRZ-BmYIo6M5.mjs.map +0 -1
- package/dist/control-m9LWRUnY.d.mts.map +0 -1
- package/dist/data-types-B7S_CHZd-C9JA40Ir.mjs.map +0 -1
- package/dist/date-time-now-generators-BrJ1cMzo-CxURsw2O.mjs.map +0 -1
- package/dist/date-time-now-generators-C2aktlrc-uf9LqU6E.d.mts.map +0 -1
- package/dist/descriptor-meta-CGRsMMdO-tQxNSE_j.mjs.map +0 -1
- package/dist/errors-Di_apgWJ-BLXRTfFj.mjs.map +0 -1
- package/dist/infer-psl-contract-BZnLgJj6-EjqMFHxE.mjs.map +0 -1
- package/dist/pack-DKR4BRIY.d.mts.map +0 -1
- package/dist/prisma7-binding-CcrXBBbM.mjs.map +0 -1
- package/dist/prisma7-binding-DFb9yHdO.d.mts.map +0 -1
- package/dist/sql-utils-0j_6QstU-DAfnt5Mu.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-types-DklKHVmp-Bl-nwUa-.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/data-types-DklKHVmp.mjs"],"sourcesContent":["import { l as postgresError } from \"./errors-DG6xgXgr.mjs\";\nimport { a as quoteIdentifier } from \"./sql-utils-ylvfJ1RJ.mjs\";\nimport { INT32_RANGE, INT64_RANGE, asFloat, asNumeralText, assembleDataTypes, castUnchanged, dateTimeStoredText, decimalTextEqualityKey, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, refuseWrongShape, storedNumeralText } from \"@internal/framework-components/codec\";\nimport { isStructuredError, structuredError } from \"@internal/utils/structured-error\";\nimport { counted, withoutTrailing } from \"@internal/utils/text\";\nimport { sqlDataType, sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { type } from \"arktype\";\n//#region src/core/data-type-values.ts\n/**\n* Whether text fits `length` characters, counted as PostgreSQL counts them: code points. A `character` value is padded with spaces, and spaces past its length are dropped, so they do not count.\n*/\nfunction fitsCharacterLength(text, length, blankPadded) {\n\tconst significant = blankPadded ? withoutTrailing(text, \" \") : text;\n\treturn significant.length <= length || [...significant].length <= length;\n}\n/** The uuid input PostgreSQL reads: 32 hex digits in either case, a hyphen allowed after any group of four but the last, and the whole optionally in braces. */\nconst UUID_INPUT = /^(?:\\{[0-9a-f]{4}(?:-?[0-9a-f]{4}){7}\\}|[0-9a-f]{4}(?:-?[0-9a-f]{4}){7})$/i;\n/**\n* Text in any form PostgreSQL reads as a UUID (either case, a hyphen after any group of four digits, optionally in braces), written the way PostgreSQL writes it; `undefined` for text it does not read as one.\n*/\nfunction storedUuid(text) {\n\tif (!UUID_INPUT.test(text)) return void 0;\n\tconst hex = text.replace(/[{}-]/g, \"\").toLowerCase();\n\treturn `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n/** The largest finite float4. */\nconst FLOAT4_MAX = 34028234663852886e22;\n/** Whether float4 holds a finite number: it neither overflows to an infinity nor rounds to 0, both of which PostgreSQL refuses. */\nfunction fitsFloat4(value) {\n\tconst single = Math.fround(value);\n\treturn Number.isFinite(single) && (value === 0 || single !== 0);\n}\nconst ISO_DURATION = /^P(?!$)(-?\\d+Y)?(-?\\d+M)?(-?\\d+D)?(?:T(?!$)(-?\\d+H)?(-?\\d+M)?(-?\\d+(?:\\.\\d+)?S)?)?$/;\nconst MICROS_PER_SECOND = 1000000n;\n/**\n* Converts a fractional-seconds digit string to microseconds, rounding rather\n* than truncating past the sixth digit.\n*\n* PostgreSQL rounds: `INTERVAL '1.1234567 seconds'` is `1.123457`, and\n* `'1.9999999 seconds'` carries into `2`. Truncating here made the parsed value\n* disagree with the database for any input past microsecond resolution.\n*\n* Ties round toward positive infinity, matching `Math.round` on the sibling path\n* that reads the driver's component object — so the two agree. PostgreSQL's own\n* tie behaviour is unobservable, because it parses the literal into a double\n* first and an exact half never survives that.\n*/\nconst microsFromFraction = (fraction, negative) => {\n\tif (fraction === \"\") return 0n;\n\tconst kept = BigInt(fraction.slice(0, 6).padEnd(6, \"0\"));\n\tconst rest = fraction.slice(6).replace(/0+$/, \"\");\n\tif (rest === \"\") return kept;\n\tconst half = rest[0] === \"5\" && rest.length === 1;\n\treturn rest > \"5\" || half && !negative ? kept + 1n : kept;\n};\nconst MICROS_PER_DAY = 86400n * MICROS_PER_SECOND;\n/** The key two stored intervals share exactly when PostgreSQL holds them equal: their total length in microseconds, a month counting as 30 days and a day as 24 hours. */\nfunction intervalEqualityKey(json) {\n\tconst { months, days, micros } = intervalFieldsOf(String(json));\n\treturn ((BigInt(months) * 30n + BigInt(days)) * MICROS_PER_DAY + micros).toString();\n}\nconst intervalFieldsOf = (text) => {\n\tconst match = ISO_DURATION.exec(text);\n\tif (match === null) throw postgresError(\"RUNTIME.DECODE_FAILED\", `pg/interval@1 value must be an ISO-8601 duration, got ${text}`, { meta: {\n\t\tcodecId: \"pg/interval@1\",\n\t\treceived: text\n\t} });\n\tconst [, years, months, days, hours, minutes, seconds] = match;\n\tconst wholeNumber = (part) => part === void 0 ? 0 : Number(part.slice(0, -1));\n\tconst secondsLiteral = seconds === void 0 ? \"0\" : seconds.slice(0, -1);\n\tconst negative = secondsLiteral.startsWith(\"-\");\n\tconst [whole = \"0\", fraction = \"\"] = secondsLiteral.replace(\"-\", \"\").split(\".\");\n\tconst magnitude = BigInt(whole) * MICROS_PER_SECOND + microsFromFraction(fraction, negative);\n\treturn {\n\t\tmonths: wholeNumber(years) * 12 + wholeNumber(months),\n\t\tdays: wholeNumber(days),\n\t\tmicros: BigInt(wholeNumber(hours)) * 3600n * MICROS_PER_SECOND + BigInt(wholeNumber(minutes)) * 60n * MICROS_PER_SECOND + (negative ? -magnitude : magnitude)\n\t};\n};\nconst secondsText = (micros) => {\n\tconst sign = micros < 0n ? \"-\" : \"\";\n\tconst magnitude = micros < 0n ? -micros : micros;\n\tconst whole = magnitude / MICROS_PER_SECOND % 60n;\n\tconst fraction = magnitude % MICROS_PER_SECOND;\n\treturn `${sign}${whole}${fraction === 0n ? \"\" : `.${fraction.toString().padStart(6, \"0\").replace(/0+$/, \"\")}`}`;\n};\n/**\n* Renders {@link PgInterval} the way PostgreSQL spells an interval under\n* `IntervalStyle = 'iso_8601'`: zero components omitted, `T` present only when a\n* time component is, each component carrying its own sign, and an all-zero\n* interval written `PT0S`.\n*/\nconst formatIsoDuration = ({ months, days, micros }) => {\n\tconst years = Math.trunc(months / 12);\n\tconst restMonths = months % 12;\n\tconst sign = micros < 0n ? \"-\" : \"\";\n\tconst magnitude = micros < 0n ? -micros : micros;\n\tconst hours = magnitude / (3600n * MICROS_PER_SECOND);\n\tconst minutes = magnitude / (60n * MICROS_PER_SECOND) % 60n;\n\tconst hasSeconds = magnitude % (60n * MICROS_PER_SECOND) !== 0n;\n\tconst parts = [\n\t\tyears === 0 ? \"\" : `${years}Y`,\n\t\trestMonths === 0 ? \"\" : `${restMonths}M`,\n\t\tdays === 0 ? \"\" : `${days}D`\n\t];\n\tconst time = [\n\t\thours === 0n ? \"\" : `${sign}${hours}H`,\n\t\tminutes === 0n ? \"\" : `${sign}${minutes}M`,\n\t\thasSeconds ? `${secondsText(micros)}S` : \"\"\n\t].join(\"\");\n\tconst rendered = `P${parts.join(\"\")}${time === \"\" ? \"\" : `T${time}`}`;\n\treturn rendered === \"P\" ? \"PT0S\" : rendered;\n};\n/**\n* An interval as PostgreSQL prints it under `IntervalStyle = 'postgres'`: `1 year 2 mons 3 days\n* 04:05:06.5`, `-1 years -2 mons +3 days -04:00:00`, `00:00:00`.\n*/\nconst POSTGRES_INTERVAL = /^(?:([+-]?\\d+) years? ?)?(?:([+-]?\\d+) mons? ?)?(?:([+-]?\\d+) days? ?)?(?:([+-])?(\\d+):(\\d{2}):(\\d{2})(?:\\.(\\d+))?)?$/;\nfunction postgresIntervalFields(text) {\n\tconst match = POSTGRES_INTERVAL.exec(text);\n\tif (match === null || text === \"\" || text.endsWith(\" \")) return void 0;\n\tconst [, years = \"0\", months = \"0\", days = \"0\", sign, hours = \"0\", minutes = \"0\", seconds = \"0\"] = match;\n\tconst fraction = match[8] ?? \"\";\n\tconst magnitude = (BigInt(hours) * 3600n + BigInt(minutes) * 60n + BigInt(seconds)) * MICROS_PER_SECOND + microsFromFraction(fraction, sign === \"-\");\n\treturn {\n\t\tmonths: Number(years) * 12 + Number(months),\n\t\tdays: Number(days),\n\t\tmicros: sign === \"-\" ? -magnitude : magnitude\n\t};\n}\nfunction intervalRefused(message) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", message, {\n\t\twhy: \"pg/interval stores one form for each interval (ADR 254), and reads ISO 8601 durations and the text PostgreSQL prints.\",\n\t\tfix: \"Write an ISO 8601 duration, as the message shows.\"\n\t});\n}\n/**\n* The stored form of `pg/interval` (ADR 254), from an ISO 8601 duration or the text PostgreSQL\n* prints under `IntervalStyle = 'postgres'`.\n*/\nfunction pgIntervalStoredText(text) {\n\tconst fractionDigits = /\\.(\\d+)/.exec(text)?.[1]?.length ?? 0;\n\tif (fractionDigits > 6) intervalRefused(`\"${text}\" has ${fractionDigits} digits after the decimal point, but pg/interval holds microseconds, so at most 6. Round it, as in \"PT1.123456S\".`);\n\tif (ISO_DURATION.test(text)) return formatIsoDuration(intervalFieldsOf(text));\n\tconst fields = postgresIntervalFields(text);\n\tif (fields === void 0) intervalRefused(`pg/interval cannot read \"${text}\". Write an ISO 8601 duration, as in \"P1Y2M3DT4H5M6S\".`);\n\treturn formatIsoDuration(fields);\n}\nconst BASE64_TEXT = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n/** Reads base64 with or without padding bits set; {@link spellPgByteaJson} writes the base64 `pg/bytea` stores. */\nconst readPgByteaJson = (owner, json) => readJsonMatching(owner, json, BASE64_TEXT, \"a base64 string\");\n/** The base64 of the same bytes with padding bits zero, as `Buffer` writes it. */\nconst spellPgByteaJson = (json) => typeof json === \"string\" ? Buffer.from(json, \"base64\").toString(\"base64\") : json;\nconst BYTEA_TEXT = /^\\\\x(?:[0-9A-Fa-f]{2})*$/;\n/** The base64 `pg/bytea` stores for the hex text PostgreSQL prints, `\\x68656c6c6f`. The `bytea` tag reads its body with this. */\nfunction pgByteaFromHexText(text) {\n\tif (!BYTEA_TEXT.test(text)) throw structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not the hex text PostgreSQL prints for bytea, which is \\\\x followed by two hexadecimal digits for each byte, as in \\\\x68656c6c6f.`, {\n\t\twhy: \"The bytea tag reads bytes as the hex text PostgreSQL prints under bytea_output = hex.\",\n\t\tfix: \"Write the bytes in hex after \\\\x, as in bytea`\\\\x68656c6c6f`.\"\n\t});\n\treturn Buffer.from(text.slice(2), \"hex\").toString(\"base64\");\n}\n/** The hex text PostgreSQL prints for the base64 `pg/bytea` stores. */\nfunction pgByteaHexText(base64) {\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\n//#endregion\n//#region src/core/postgres-year-text.ts\n/**\n* PostgreSQL's year text (ADR 254, \"Date and time types\"). PostgreSQL reads and prints no signed year: a year after 9999 is written without its sign and leading zeros, `10000-01-01`, and a year at or before ISO year 0000 with a ` BC` suffix and PostgreSQL's year number, which has no year 0, so ISO year 0000 is `0001 BC` and -000043 is `0044 BC`. Every Postgres date and time codec and tag converts years through these two functions.\n*/\nconst POSTGRES_YEAR = /^(\\d{4,6})(-.*?)( BC)?$/;\nconst ISO_YEAR = /^([+-]\\d{6,}|\\d{4})(-.*)$/;\nconst BC_SUFFIX = \" BC\";\n/** ISO 8601 text, with a four-digit or signed six-digit year, from text PostgreSQL prints. Text with no year, ISO text and `0000 BC`, which does not exist, stay as they are. */\nfunction isoYearText(text) {\n\tconst match = POSTGRES_YEAR.exec(text);\n\tif (match === null) return text;\n\tconst [, digits = \"\", rest = \"\", bc] = match;\n\tconst year = Number(digits);\n\tif (bc !== void 0) {\n\t\tif (year === 0) return text;\n\t\treturn `${isoYear(1 - year)}${rest}`;\n\t}\n\treturn digits.length > 4 ? `${isoYear(year)}${rest}` : text;\n}\n/** The text PostgreSQL reads for ISO 8601 text with a four-digit year or a signed year of six or more digits. Text with no year stays as it is. */\nfunction postgresYearText(text) {\n\tconst match = ISO_YEAR.exec(text);\n\tif (match === null) return text;\n\tconst [, yearDigits = \"\", rest = \"\"] = match;\n\tconst year = Number(yearDigits);\n\tif (year > 9999) return `${year}${rest}`;\n\tif (year >= 1) return `${String(year).padStart(4, \"0\")}${rest}`;\n\treturn `${String(1 - year).padStart(4, \"0\")}${rest}${BC_SUFFIX}`;\n}\nfunction isoYear(year) {\n\tif (year >= 0 && year <= 9999) return String(year).padStart(4, \"0\");\n\treturn `${year < 0 ? \"-\" : \"+\"}${String(Math.abs(year)).padStart(6, \"0\")}`;\n}\n//#endregion\n//#region src/core/stored-inet.ts\nconst DIGIT = /^[0-9]$/;\nconst HEX_DIGIT = /^[0-9a-fA-F]$/;\nconst isDigit = (ch) => ch !== void 0 && DIGIT.test(ch);\n/**\n* Text PostgreSQL reads as an `inet` value, written the way PostgreSQL prints it: an IPv4 address in\n* four decimal octets, an IPv6 address in lower-case hex with its longest run of zero groups written\n* `::`, and the prefix length only when it is shorter than the whole address. `undefined` for text\n* PostgreSQL does not read as an `inet` value.\n*/\nfunction storedInet(text) {\n\tif (text.includes(\":\")) {\n\t\tconst value = readIpv6(text);\n\t\treturn value === void 0 ? void 0 : printIpv6(value);\n\t}\n\tconst value = readIpv4(text);\n\treturn value === void 0 ? void 0 : printIpv4(value);\n}\n/**\n* PostgreSQL's `inet_net_pton_ipv4`: one to four decimal octets, each up to 255 and leading zeros\n* allowed, then an optional `/` and prefix length up to 32. Without a prefix length all four octets\n* are required; with one, the octets written must cover it.\n*/\nfunction readIpv4(text) {\n\tconst octets = [];\n\tlet index = 0;\n\tlet ch = text[index++];\n\twhile (isDigit(ch)) {\n\t\tlet octet = 0;\n\t\tdo {\n\t\t\toctet = octet * 10 + Number(ch);\n\t\t\tif (octet > 255) return void 0;\n\t\t\tch = text[index++];\n\t\t} while (isDigit(ch));\n\t\tif (octets.length === 4) return void 0;\n\t\toctets.push(octet);\n\t\tif (ch === void 0 || ch === \"/\") break;\n\t\tif (ch !== \".\") return void 0;\n\t\tch = text[index++];\n\t}\n\tlet bits = -1;\n\tif (ch === \"/\" && isDigit(text[index]) && octets.length > 0) {\n\t\tch = text[index++];\n\t\tbits = 0;\n\t\tdo {\n\t\t\tbits = bits * 10 + Number(ch);\n\t\t\tch = text[index++];\n\t\t} while (isDigit(ch));\n\t\tif (ch !== void 0 || bits > 32) return void 0;\n\t}\n\tif (ch !== void 0) return void 0;\n\tif (bits === -1) {\n\t\tif (octets.length !== 4) return void 0;\n\t\tbits = 32;\n\t}\n\tif (octets.length === 0 || Math.floor(bits / 8) > octets.length) return void 0;\n\treturn {\n\t\tbytes: [\n\t\t\t...octets,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0\n\t\t].slice(0, 4),\n\t\tbits\n\t};\n}\n/** PostgreSQL's `getbits`: a prefix length up to 128, with no leading zero. */\nfunction readBits(text) {\n\tlet bits = 0;\n\tlet digits = 0;\n\tfor (const ch of text) {\n\t\tif (!isDigit(ch)) return void 0;\n\t\tif (digits++ !== 0 && bits === 0) return void 0;\n\t\tbits = bits * 10 + Number(ch);\n\t\tif (bits > 128) return void 0;\n\t}\n\treturn digits === 0 ? void 0 : bits;\n}\n/**\n* PostgreSQL's `getv4`, for the IPv4 tail of an IPv6 address: up to four decimal octets with no\n* leading zeros, and an optional prefix length. Octets left out are zero.\n*/\nfunction readIpv4Tail(text) {\n\tconst octets = [];\n\tlet octet = 0;\n\tlet digits = 0;\n\tfor (const [index, ch] of [...text].entries()) {\n\t\tif (isDigit(ch)) {\n\t\t\tif (digits++ !== 0 && octet === 0) return void 0;\n\t\t\toctet = octet * 10 + Number(ch);\n\t\t\tif (octet > 255) return void 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch !== \".\" && ch !== \"/\") return void 0;\n\t\tif (octets.length > 3) return void 0;\n\t\toctets.push(octet);\n\t\tif (ch === \"/\") {\n\t\t\tconst bits = readBits(text.slice(index + 1));\n\t\t\treturn bits === void 0 ? void 0 : {\n\t\t\t\toctets,\n\t\t\t\tbits\n\t\t\t};\n\t\t}\n\t\toctet = 0;\n\t\tdigits = 0;\n\t}\n\tif (digits === 0 || octets.length > 3) return void 0;\n\treturn {\n\t\toctets: [...octets, octet],\n\t\tbits: void 0\n\t};\n}\n/**\n* PostgreSQL's `inet_cidr_pton_ipv6`: up to eight groups of one to four hex digits in either case,\n* one `::` standing for a run of zero groups, an optional IPv4 tail, and an optional prefix length.\n*/\nfunction readIpv6(text) {\n\tconst bytes = new Array(16).fill(0);\n\tlet filled = 0;\n\tlet compressedAt;\n\tlet index = 0;\n\tif (text[0] === \":\") {\n\t\tif (text[1] !== \":\") return void 0;\n\t\tindex = 1;\n\t}\n\tlet tokenStart = index;\n\tlet sawHexDigit = false;\n\tlet group = 0;\n\tlet groupDigits = 0;\n\tlet bits = 128;\n\twhile (index < text.length) {\n\t\tconst ch = text[index++] ?? \"\";\n\t\tif (HEX_DIGIT.test(ch)) {\n\t\t\tgroup = group << 4 | Number.parseInt(ch, 16);\n\t\t\tif (++groupDigits > 4) return void 0;\n\t\t\tsawHexDigit = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch === \":\") {\n\t\t\ttokenStart = index;\n\t\t\tif (!sawHexDigit) {\n\t\t\t\tif (compressedAt !== void 0) return void 0;\n\t\t\t\tcompressedAt = filled;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (index >= text.length || filled + 2 > 16) return void 0;\n\t\t\tbytes[filled++] = group >> 8;\n\t\t\tbytes[filled++] = group & 255;\n\t\t\tsawHexDigit = false;\n\t\t\tgroup = 0;\n\t\t\tgroupDigits = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch === \".\" && filled + 4 <= 16) {\n\t\t\tconst tail = readIpv4Tail(text.slice(tokenStart));\n\t\t\tif (tail !== void 0) {\n\t\t\t\ttail.octets.forEach((octet, offset) => {\n\t\t\t\t\tbytes[filled + offset] = octet;\n\t\t\t\t});\n\t\t\t\tfilled += 4;\n\t\t\t\tsawHexDigit = false;\n\t\t\t\tbits = tail.bits ?? bits;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (ch === \"/\") {\n\t\t\tconst prefix = readBits(text.slice(index));\n\t\t\tif (prefix !== void 0) {\n\t\t\t\tbits = prefix;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (sawHexDigit) {\n\t\tif (filled + 2 > 16) return void 0;\n\t\tbytes[filled++] = group >> 8;\n\t\tbytes[filled++] = group & 255;\n\t}\n\tif (compressedAt !== void 0) {\n\t\tif (filled === 16) return void 0;\n\t\tconst shifted = bytes.slice(compressedAt, filled);\n\t\tbytes.fill(0, compressedAt, filled);\n\t\tbytes.splice(16 - shifted.length, shifted.length, ...shifted);\n\t\tfilled = 16;\n\t}\n\treturn filled === 16 ? {\n\t\tbytes,\n\t\tbits\n\t} : void 0;\n}\nfunction printIpv4({ bytes, bits }) {\n\tconst address = bytes.join(\".\");\n\treturn bits === 32 ? address : `${address}/${bits}`;\n}\n/**\n* PostgreSQL's `inet_net_ntop_ipv6`: the first longest run of two or more zero groups is written\n* `::`, and an address whose first five groups are zero followed by `ffff`, or whose first six are\n* zero, ends in dotted IPv4.\n*/\nfunction printIpv6({ bytes, bits }) {\n\tconst groups = Array.from({ length: 8 }, (_, i) => (bytes[2 * i] ?? 0) << 8 | (bytes[2 * i + 1] ?? 0));\n\tconst zeroRun = longestZeroRun(groups);\n\tlet text = \"\";\n\tfor (let i = 0; i < 8; i++) {\n\t\tif (zeroRun !== void 0 && i >= zeroRun.start && i < zeroRun.start + zeroRun.length) {\n\t\t\tif (i === zeroRun.start) text += \":\";\n\t\t\tcontinue;\n\t\t}\n\t\tif (i !== 0) text += \":\";\n\t\tif (i === 6 && zeroRun?.start === 0 && (zeroRun.length === 6 || zeroRun.length === 5 && groups[5] === 65535)) {\n\t\t\ttext += bytes.slice(12).join(\".\");\n\t\t\tbreak;\n\t\t}\n\t\ttext += (groups[i] ?? 0).toString(16);\n\t}\n\tif (zeroRun !== void 0 && zeroRun.start + zeroRun.length === 8) text += \":\";\n\treturn bits === 128 ? text : `${text}/${bits}`;\n}\nfunction longestZeroRun(groups) {\n\tlet best;\n\tlet current;\n\tfor (const [i, group] of groups.entries()) {\n\t\tif (group === 0) {\n\t\t\tcurrent = current === void 0 ? {\n\t\t\t\tstart: i,\n\t\t\t\tlength: 1\n\t\t\t} : {\n\t\t\t\t...current,\n\t\t\t\tlength: current.length + 1\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\tif (current !== void 0 && (best === void 0 || current.length > best.length)) best = current;\n\t\tcurrent = void 0;\n\t}\n\tif (current !== void 0 && (best === void 0 || current.length > best.length)) best = current;\n\treturn best !== void 0 && best.length >= 2 ? best : void 0;\n}\n//#endregion\n//#region src/core/data-types.ts\nconst written = (text) => ({\n\ttext,\n\twritten: true\n});\nconst catalog = (text) => ({\n\ttext,\n\tcatalog: true\n});\nconst writtenAndCatalog = (text) => ({\n\ttext,\n\twritten: true,\n\tcatalog: true\n});\nconst claimsOnly = (text) => ({ text });\nconst anyJson = (json) => json;\nconst readString = (id) => (json) => readJsonString(id, json);\n/** A parameter a type declares as a whole number, or undefined when the column does not set it. */\nfunction integerParam(params, name) {\n\tconst value = params[name];\n\treturn typeof value === \"number\" ? value : void 0;\n}\n/** A decimal numeral: an optional minus sign, digits, and an optional fraction. */\nconst DECIMAL_NUMERAL_TEXT = /^-?\\d+(?:\\.\\d+)?$/;\n/**\n* Numeric text in the form PostgreSQL *prints*, which is narrower than the form it accepts.\n*\n* `numeric` reads `+123`, `.5`, `1.`, `1e5`, `0x1f`, `1_000`, `007`, `-0` and whitespace-padded input, but prints every one of them in a single normalised form — `123`, `0.5`, `1`, `100000`, `31`, `1000`, `7`, `0`. A value in any other form is one the database never returns: `1e5` reads back as `100000`.\n*\n* `NaN`, `Infinity` and `-Infinity` are genuine `numeric` values, which PostgreSQL emits into JSON as strings.\n*/\nconst STORED_NUMERIC_TEXT = /^(?:(?!-0(?:\\.0+)?$)-?(?:0|[1-9]\\d*)(?:\\.\\d+)?|NaN|-?Infinity)$/;\n/**\n* Whether stored 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 readNumeric = (json, params) => {\n\tif (typeof json !== \"string\" || !STORED_NUMERIC_TEXT.test(json)) {\n\t\tconst printed = typeof json === \"string\" && DECIMAL_NUMERAL_TEXT.test(json) ? storedNumeralText(json) : void 0;\n\t\treturn refuseJsonValue(\"pg/numeric\", printed === void 0 ? \"a decimal string\" : `\"${printed}\", as PostgreSQL writes this value`, json);\n\t}\n\tconst precision = integerParam(params, \"precision\");\n\tif (precision === void 0) return json;\n\tconst scale = integerParam(params, \"scale\") ?? 0;\n\tif (!fitsNumeric(json, precision, scale)) return refuseJsonValue(\"pg/numeric\", `a decimal string that numeric(${precision}, ${scale}) stores without rounding`, json);\n\treturn json;\n};\n/** A value of `numeric(precision, scale)` is written as PostgreSQL prints it: with exactly `scale` fraction digits, none for a scale of 0 or below. */\nconst spellNumeric = (json, params) => {\n\tif (integerParam(params, \"precision\") === void 0 || typeof json !== \"string\" || json === \"NaN\") return json;\n\tconst scale = integerParam(params, \"scale\") ?? 0;\n\tconst [whole = \"\", fraction = \"\"] = json.split(\".\");\n\treturn scale <= 0 ? whole : `${whole}.${fraction.slice(0, scale).padEnd(scale, \"0\")}`;\n};\nconst readFloat4 = (json) => {\n\tconst value = readJsonFloat(\"pg/float4\", json);\n\tif (Number.isFinite(value) && !fitsFloat4(value)) return refuseJsonValue(\"pg/float4\", `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\treturn json;\n};\n/** A `character` value is spelled without the spaces that pad it to its length, as the application reads it. */\nconst spellCharacter = (json) => typeof json === \"string\" ? withoutTrailing(json, \" \") : json;\n/** A `character` column holds its length in characters, and one with no length is `character(1)`; the spaces that pad a value to its length do not count. */\nconst readCharacter = (json, params) => {\n\tconst length = integerParam(params, \"length\") ?? 1;\n\tif (!fitsCharacterLength(readJsonString(\"pg/char\", json), length, true)) return refuseJsonValue(\"pg/char\", `a string of at most ${counted(length, \"character\")} before any trailing spaces`, json);\n\treturn json;\n};\n/** A `character varying` column with a length holds at most that many characters. */\nconst readCharacterVarying = (json, params) => {\n\tconst length = integerParam(params, \"length\");\n\tconst text = readJsonString(\"pg/varchar\", json);\n\tif (length !== void 0 && !fitsCharacterLength(text, length, false)) return refuseJsonValue(\"pg/varchar\", `a string of at most ${counted(length, \"character\")}`, json);\n\treturn json;\n};\nconst BIT_STRING = /^[01]*$/;\n/** A `bit` column holds exactly its length in bits, and one with no length is `bit(1)`. */\nconst readBit = (json, params) => {\n\tconst length = integerParam(params, \"length\") ?? 1;\n\tif (readJsonMatching(\"pg/bit\", json, BIT_STRING, \"a string of 0 and 1 digits\").length !== length) return refuseJsonValue(\"pg/bit\", `a string of exactly ${counted(length, \"bit\")}`, json);\n\treturn json;\n};\n/** A `bit varying` column with a length holds at most that many bits. */\nconst readBitVarying = (json, params) => {\n\tconst length = integerParam(params, \"length\");\n\tconst bits = readJsonMatching(\"pg/varbit\", json, BIT_STRING, \"a string of 0 and 1 digits\");\n\tif (length !== void 0 && bits.length > length) return refuseJsonValue(\"pg/varbit\", `a string of at most ${counted(length, \"bit\")}`, json);\n\treturn json;\n};\n/** A `text[]` may hold NULL elements, which PostgreSQL writes as JSON `null`. */\nconst readTextArray = (json) => {\n\tconst expected = \"an array of strings and nulls\";\n\tif (!Array.isArray(json)) return refuseJsonValue(\"pg/text-array\", expected, json);\n\tfor (const entry of json) if (entry !== null && typeof entry !== \"string\") return refuseJsonValue(\"pg/text-array\", expected, entry);\n\treturn json;\n};\n/** Reads a UUID in any spelling PostgreSQL reads; `spellUuid` gives it the one it stores. */\nconst readUuid = (json) => typeof json === \"string\" && storedUuid(json) !== void 0 ? json : refuseJsonValue(\"pg/uuid\", \"a UUID in a spelling PostgreSQL reads: 32 hexadecimal digits in either case, with or without a hyphen after any group of four, optionally in braces\", json);\n/** A UUID is stored as PostgreSQL prints it: lower case, hyphenated 8-4-4-4-12. */\nconst spellUuid = (json) => typeof json === \"string\" ? storedUuid(json) ?? json : json;\n/** Reads an address in any spelling PostgreSQL reads; `spellInet` gives it the one it stores. */\nconst readInet = (json) => typeof json === \"string\" && storedInet(json) !== void 0 ? json : refuseJsonValue(\"pg/inet\", \"an IP address or network in a spelling PostgreSQL reads, as in 10.0.0.1 or 2001:db8::/32\", json);\n/** An address is stored as PostgreSQL prints it. */\nconst spellInet = (json) => typeof json === \"string\" ? storedInet(json) ?? json : json;\n/** The fraction digits of a second the date, time and interval types hold when a column sets no precision: microseconds. */\nconst MICROSECOND_DIGITS = 6;\n/**\n* A value with more fraction digits of a second than the column's `precision`, or than microseconds when it sets none, which PostgreSQL would round, is refused rather than rounded. Trailing zeros of a fraction are not digits of the value.\n*/\nfunction refuseFinerThanPrecision(typeId, json, fraction, params) {\n\tconst precision = integerParam(params, \"precision\") ?? MICROSECOND_DIGITS;\n\tif (withoutTrailing(fraction ?? \"\", \"0\").length <= precision) return json;\n\treturn refuseJsonValue(typeId, `a value with at most ${counted(precision, \"fraction digit\")} of a second, which precision ${precision} holds without rounding`, json);\n}\n/** What `storedText` writes for `text`, or why it cannot read it. */\nfunction storedSpelling(storedText, text) {\n\ttry {\n\t\treturn { stored: storedText(text) };\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.CAST_REFUSED\") return { reason: error.message };\n\t\tthrow error;\n\t}\n}\n/**\n* Reads a value of a date or time type (ADR 254, \"Date and time types\") in any spelling its tag reads, and refuses other text. A value with more fraction digits than the column's precision is refused rather than rounded. `spellStoredDateTime` gives the value its one stored spelling.\n*/\nconst readStoredDateTime = (typeId, storedText, description, fraction) => (json, params) => {\n\tif (typeof json !== \"string\") return refuseJsonValue(typeId, description, json);\n\tconst spelling = storedSpelling(storedText, json);\n\tif (\"reason\" in spelling) return refuseJsonValue(typeId, `${description}: ${spelling.reason}`, json);\n\trefuseFinerThanPrecision(typeId, json, fraction.exec(spelling.stored)?.[1], params);\n\treturn json;\n};\n/** The stored spelling of a date or time value: what `storedText` writes. */\nconst spellStoredDateTime = (storedText) => (json) => {\n\tif (typeof json !== \"string\") return json;\n\tconst spelling = storedSpelling(storedText, json);\n\treturn \"stored\" in spelling ? spelling.stored : json;\n};\nconst SECONDS_FRACTION = /:\\d{2}\\.(\\d+)/;\nconst INTERVAL_SECONDS_FRACTION = /\\d\\.(\\d+)S$/;\n/** The precision and scale of `numeric`. PostgreSQL 15 and later take a negative scale and one above the precision. */\nconst pgNumericParams = type({\n\t\"precision?\": \"number.integer >= 1 & number.integer <= 1000\",\n\t\"scale?\": \"number.integer >= -1000 & number.integer <= 1000\"\n}).narrow((params, ctx) => params.scale === void 0 || params.precision !== void 0 || ctx.reject({\n\tpath: [\"scale\"],\n\tmessage: \"scale requires a precision\"\n}));\n/** The length of `char` and `varchar`. */\nconst pgCharacterLengthParams = type({ \"length?\": \"number.integer >= 1 & number.integer <= 10485760\" });\n/** The length of `bit` and `bit varying`. */\nconst pgBitLengthParams = type({ \"length?\": \"number.integer >= 1 & number.integer <= 83886080\" });\n/** The fractional-second precision of the time, timestamp and interval types. */\nconst pgPrecisionParams = type({ \"precision?\": \"number.integer >= 0 & number.integer <= 6\" });\n/** PostgreSQL stores microseconds whether a precision of 6 is declared or omitted, so an omitted precision is 6. */\nconst withDefaultPrecision = (params) => params.precision === void 0 ? {\n\t...params,\n\tprecision: 6\n} : params;\n/** PostgreSQL's catalog prints a precision only where one was declared. */\nconst precisionAsWritten = (params) => params;\nconst pgEnumParams = type({ typeName: \"string > 0\" });\n/** A type with no parameters that is written and reported by its own name. */\nconst namedOnly = (id, name, read, casts = {}) => sqlDataType(id, {\n\ttexts: [writtenAndCatalog(name)],\n\tread,\n\tcasts\n});\nconst withDefaultLength = (params) => params.length === void 0 ? {\n\t...params,\n\tlength: 1\n} : params;\nconst pgText = namedOnly(\"pg/text\", \"text\", readString(\"pg/text\"));\nconst pgTextArray = sqlDataType(\"pg/text-array\", { read: readTextArray });\n/** The enum's `typeName`: its name in `public` or with no schema, its schema-qualified name elsewhere. */\nfunction qualifiedEnumName(reported) {\n\tconst name = reported.name ?? \"\";\n\treturn reported.schema === void 0 || reported.schema === \"public\" ? name : `${reported.schema}.${name}`;\n}\nconst pgEnum = sqlDataType(\"pg/enum\", {\n\tparams: pgEnumParams,\n\tread: readString(\"pg/enum\"),\n\tclaimsKind: \"enum\",\n\trender: ({ typeName }) => {\n\t\tconst dot = typeName.indexOf(\".\");\n\t\treturn dot === -1 ? quoteIdentifier(typeName) : `${quoteIdentifier(typeName.slice(0, dot))}.${quoteIdentifier(typeName.slice(dot + 1))}`;\n\t},\n\tfromReported: (reported) => ({ typeName: qualifiedEnumName(reported) })\n});\nconst pgInt2 = sqlDataType(\"pg/int2\", {\n\ttexts: [written(\"int2\"), catalog(\"smallint\")],\n\tread: (json) => readJsonInteger(\"pg/int2\", json, {\n\t\tmin: -32768,\n\t\tmax: 32767\n\t})\n});\nconst pgBool = sqlDataType(\"pg/bool\", {\n\ttexts: [written(\"bool\"), catalog(\"boolean\")],\n\tread: (json) => readJsonBoolean(\"pg/bool\", json)\n});\nconst pgJson = namedOnly(\"pg/json\", \"json\", anyJson);\nconst pgTsquery = namedOnly(\"pg/tsquery\", \"tsquery\", readString(\"pg/tsquery\"));\nconst pgInt4 = sqlDataType(\"pg/int4\", {\n\ttexts: [\n\t\twritten(\"int4\"),\n\t\tcatalog(\"integer\"),\n\t\tclaimsOnly(\"int\")\n\t],\n\tread: (json) => readJsonInteger(\"pg/int4\", json, INT32_RANGE),\n\tcasts: { [pgInt2.id]: castUnchanged }\n});\nconst pgInt8 = sqlDataType(\"pg/int8\", {\n\ttexts: [written(\"int8\"), catalog(\"bigint\")],\n\tread: (json) => {\n\t\treadJsonIntegerText(\"pg/int8\", json, INT64_RANGE);\n\t\treturn json;\n\t},\n\tcasts: {\n\t\t[pgInt2.id]: asNumeralText,\n\t\t[pgInt4.id]: asNumeralText\n\t}\n});\nconst pgNumeric = sqlDataType(\"pg/numeric\", {\n\tparams: pgNumericParams,\n\ttexts: [\n\t\twrittenAndCatalog(\"numeric\"),\n\t\twritten(\"numeric({precision})\"),\n\t\twrittenAndCatalog(\"numeric({precision},{scale})\"),\n\t\tclaimsOnly(\"decimal\"),\n\t\tclaimsOnly(\"decimal({precision})\"),\n\t\tclaimsOnly(\"decimal({precision},{scale})\")\n\t],\n\tread: readNumeric,\n\tspell: spellNumeric,\n\tequalityKey: decimalTextEqualityKey,\n\tnormalize: (params) => params.precision !== void 0 && params.scale === void 0 ? {\n\t\t...params,\n\t\tscale: 0\n\t} : params,\n\tcasts: {\n\t\t[pgInt2.id]: asNumeralText,\n\t\t[pgInt4.id]: asNumeralText,\n\t\t[pgInt8.id]: castUnchanged\n\t}\n});\n/** `float4` stores a single-precision float, so a magnitude past about 3.4e38, or one it would round to 0, does not fit. */\nconst asFloat4 = (value) => {\n\tconst converted = asFloat(value);\n\tif (typeof converted !== \"number\" || fitsFloat4(converted)) return converted;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `${converted} is out of range: float4 holds a nonzero magnitude from about 1.4e-45 to 3.4e38.`, {\n\t\twhy: \"float4 stores a single-precision float, which overflows past about 3.4e38 and rounds a magnitude below about 1.4e-45 to 0.\",\n\t\tfix: \"Use a number float4 holds, or a float8 or numeric column.\"\n\t});\n};\nconst floatCastsOf = (cast) => ({\n\t[pgInt2.id]: cast,\n\t[pgInt4.id]: cast,\n\t[pgInt8.id]: cast,\n\t[pgNumeric.id]: cast\n});\nconst pgFloat4 = sqlDataType(\"pg/float4\", {\n\ttexts: [written(\"float4\"), catalog(\"real\")],\n\tread: readFloat4,\n\tcasts: floatCastsOf(asFloat4)\n});\nconst pgFloat8 = sqlDataType(\"pg/float8\", {\n\ttexts: [\n\t\twritten(\"float8\"),\n\t\tcatalog(\"double precision\"),\n\t\tclaimsOnly(\"float\")\n\t],\n\tread: (json) => {\n\t\treadJsonFloat(\"pg/float8\", json);\n\t\treturn json;\n\t},\n\tcasts: floatCastsOf(asFloat)\n});\nconst pgJsonb = namedOnly(\"pg/jsonb\", \"jsonb\", anyJson, { [pgJson.id]: castUnchanged });\n/** Why no enum can use a codec of `pg/jsonb`, which every such codec gives as its `enumRefusal`. */\nconst pgJsonbEnumRefusal = \"A CHECK lists a string member as SQL text, which PostgreSQL reads as the JSON text of a document rather than as a string, and a number member as a number, which PostgreSQL cannot compare with jsonb, so no CHECK can compare a value with the members. No enum can use a jsonb codec; use a text enum instead.\";\nconst fromText = { [pgText.id]: castUnchanged };\nconst pgChar = sqlDataType(\"pg/char\", {\n\tparams: pgCharacterLengthParams,\n\ttexts: [\n\t\twritten(\"character\"),\n\t\twrittenAndCatalog(\"character({length})\"),\n\t\tclaimsOnly(\"char\"),\n\t\tclaimsOnly(\"char({length})\")\n\t],\n\tread: readCharacter,\n\tspell: spellCharacter,\n\tnormalize: withDefaultLength,\n\tcasts: fromText\n});\nconst pgVarchar = sqlDataType(\"pg/varchar\", {\n\tparams: pgCharacterLengthParams,\n\ttexts: [\n\t\twrittenAndCatalog(\"character varying\"),\n\t\twrittenAndCatalog(\"character varying({length})\"),\n\t\tclaimsOnly(\"varchar\"),\n\t\tclaimsOnly(\"varchar({length})\")\n\t],\n\tread: readCharacterVarying,\n\tcasts: fromText\n});\n/** Text in any form PostgreSQL reads as a UUID, written the way PostgreSQL writes it, so the contract holds the value the database reports. */\nconst asUuid = (value) => {\n\tif (typeof value !== \"string\") return refuseWrongShape(value, \"text\");\n\tconst uuid = storedUuid(value);\n\tif (uuid !== void 0) return uuid;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `${JSON.stringify(value)} is not a UUID: PostgreSQL reads 32 hexadecimal digits, with a hyphen after any group of four and optionally in braces.`, {\n\t\twhy: \"A uuid column takes only text PostgreSQL reads as a UUID.\",\n\t\tfix: \"Write a UUID such as a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11.\"\n\t});\n};\nconst pgUuid = sqlDataType(\"pg/uuid\", {\n\ttexts: [writtenAndCatalog(\"uuid\")],\n\tread: readUuid,\n\tspell: spellUuid,\n\tcasts: { [pgText.id]: asUuid }\n});\nconst pgBit = sqlDataType(\"pg/bit\", {\n\tparams: pgBitLengthParams,\n\ttexts: [written(\"bit\"), writtenAndCatalog(\"bit({length})\")],\n\tread: readBit,\n\tnormalize: withDefaultLength,\n\tcasts: fromText\n});\nconst pgVarbit = sqlDataType(\"pg/varbit\", {\n\tparams: pgBitLengthParams,\n\ttexts: [\n\t\twrittenAndCatalog(\"bit varying\"),\n\t\twrittenAndCatalog(\"bit varying({length})\"),\n\t\tclaimsOnly(\"varbit\"),\n\t\tclaimsOnly(\"varbit({length})\")\n\t],\n\tread: readBitVarying,\n\tcasts: fromText\n});\nconst INFINITIES = /* @__PURE__ */ new Set([\"infinity\", \"-infinity\"]);\n/**\n* The stored form of a date or time type (ADR 254), from ISO 8601 or the text PostgreSQL prints.\n* `infinity` and `-infinity` are values of the types that hold them.\n*/\nfunction postgresDateTime(options, holdsInfinity) {\n\treturn (text) => holdsInfinity && INFINITIES.has(text) ? text : dateTimeStoredText(isoYearText(text), options, text);\n}\n/**\n* Each range is what PostgreSQL and every codec of the type hold: PostgreSQL starts at 4714-11-24\n* BC, and the `Temporal` and `Date` codecs end at +275760-09-13.\n*/\nconst pgDateStoredText = postgresDateTime({\n\tshape: \"date\",\n\townerId: \"pg/date\",\n\trange: {\n\t\tearliest: \"-004713-11-24\",\n\t\tlatest: \"+275760-09-13\"\n\t}\n}, true);\nconst pgTimeStoredText = postgresDateTime({\n\tshape: \"time\",\n\townerId: \"pg/time\"\n}, false);\nconst pgTimetzStoredText = postgresDateTime({\n\tshape: \"timeWithOffset\",\n\townerId: \"pg/timetz\",\n\tmaxOffsetHours: 15\n}, false);\nconst pgTimestampStoredText = postgresDateTime({\n\tshape: \"dateTime\",\n\townerId: \"pg/timestamp\",\n\trange: {\n\t\tearliest: \"-004713-11-24T00:00:00\",\n\t\tlatest: \"+275760-09-13T23:59:59.999999\"\n\t}\n}, true);\nconst pgTimestamptzStoredText = postgresDateTime({\n\tshape: \"instant\",\n\townerId: \"pg/timestamptz\",\n\trange: {\n\t\tearliest: \"-004713-11-24T00:00:00Z\",\n\t\tlatest: \"+275760-09-13T00:00:00Z\"\n\t}\n}, true);\n/** A cast that takes text and gives the value `read` makes of it. */\nconst castFromText = (read) => (value) => typeof value === \"string\" ? read(value) : refuseWrongShape(value, \"text\");\nconst pgTimetz = sqlDataType(\"pg/timetz\", {\n\tread: readStoredDateTime(\"pg/timetz\", pgTimetzStoredText, \"a time of day with its UTC offset, as in \\\"12:34:56+02:00\\\" or \\\"12:34:56Z\\\"\", SECONDS_FRACTION),\n\tspell: spellStoredDateTime(pgTimetzStoredText),\n\tparams: pgPrecisionParams,\n\tnormalize: withDefaultPrecision,\n\tcatalogParams: precisionAsWritten,\n\ttexts: [\n\t\twritten(\"timetz\"),\n\t\twritten(\"timetz({precision})\"),\n\t\tcatalog(\"time with time zone\"),\n\t\tcatalog(\"time({precision}) with time zone\")\n\t]\n});\nconst pgInterval = sqlDataType(\"pg/interval\", {\n\tread: readStoredDateTime(\"pg/interval\", pgIntervalStoredText, \"an ISO 8601 duration, as in \\\"P1Y2M3DT4H5M6.5S\\\"\", INTERVAL_SECONDS_FRACTION),\n\tspell: spellStoredDateTime(pgIntervalStoredText),\n\tequalityKey: intervalEqualityKey,\n\tparams: pgPrecisionParams,\n\tnormalize: withDefaultPrecision,\n\tcatalogParams: precisionAsWritten,\n\ttexts: [writtenAndCatalog(\"interval\"), writtenAndCatalog(\"interval({precision})\")]\n});\nconst pgBytea = sqlDataType(\"pg/bytea\", {\n\tread: (json) => readPgByteaJson(\"pg/bytea\", json),\n\tspell: spellPgByteaJson,\n\ttexts: [writtenAndCatalog(\"bytea\")]\n});\n/** Text PostgreSQL reads as an IP address, written the way PostgreSQL writes it, so the contract holds the value the database reports. */\nfunction pgInetStoredText(text) {\n\tconst inet = storedInet(text);\n\tif (inet !== void 0) return inet;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `${JSON.stringify(text)} is not an IP address: PostgreSQL reads an IPv4 address in decimal octets or an IPv6 address in hexadecimal groups, either optionally followed by / and a prefix length.`, {\n\t\twhy: \"An inet column takes only text PostgreSQL reads as an IP address.\",\n\t\tfix: \"Write an address such as 192.168.0.1 or 2001:db8::1/64.\"\n\t});\n}\nconst pgInet = sqlDataType(\"pg/inet\", {\n\tread: readInet,\n\tspell: spellInet,\n\ttexts: [writtenAndCatalog(\"inet\")],\n\tcasts: { [pgText.id]: castFromText(pgInetStoredText) }\n});\nconst pgDate = sqlDataType(\"pg/date\", {\n\tread: readStoredDateTime(\"pg/date\", pgDateStoredText, \"a date, as in \\\"2024-01-01\\\", or infinity or -infinity\", SECONDS_FRACTION),\n\tspell: spellStoredDateTime(pgDateStoredText),\n\ttexts: [writtenAndCatalog(\"date\")]\n});\nconst pgTime = sqlDataType(\"pg/time\", {\n\tread: readStoredDateTime(\"pg/time\", pgTimeStoredText, \"a time of day, as in \\\"12:34:56\\\"\", SECONDS_FRACTION),\n\tspell: spellStoredDateTime(pgTimeStoredText),\n\tparams: pgPrecisionParams,\n\tnormalize: withDefaultPrecision,\n\tcatalogParams: precisionAsWritten,\n\ttexts: [\n\t\twritten(\"time\"),\n\t\twritten(\"time({precision})\"),\n\t\tcatalog(\"time without time zone\"),\n\t\tcatalog(\"time({precision}) without time zone\")\n\t]\n});\nconst pgTimestamp = sqlDataType(\"pg/timestamp\", {\n\tread: readStoredDateTime(\"pg/timestamp\", pgTimestampStoredText, \"a date and time of day, as in \\\"2024-01-01T12:34:56\\\", or infinity or -infinity\", SECONDS_FRACTION),\n\tspell: spellStoredDateTime(pgTimestampStoredText),\n\tparams: pgPrecisionParams,\n\tnormalize: withDefaultPrecision,\n\tcatalogParams: precisionAsWritten,\n\ttexts: [\n\t\twritten(\"timestamp\"),\n\t\twritten(\"timestamp({precision})\"),\n\t\tcatalog(\"timestamp without time zone\"),\n\t\tcatalog(\"timestamp({precision}) without time zone\")\n\t]\n});\nconst pgTimestamptz = sqlDataType(\"pg/timestamptz\", {\n\tread: readStoredDateTime(\"pg/timestamptz\", pgTimestamptzStoredText, \"an instant in UTC, as in \\\"2024-01-01T00:00:00Z\\\", or infinity or -infinity\", SECONDS_FRACTION),\n\tspell: spellStoredDateTime(pgTimestamptzStoredText),\n\tparams: pgPrecisionParams,\n\tnormalize: withDefaultPrecision,\n\tcatalogParams: precisionAsWritten,\n\ttexts: [\n\t\twritten(\"timestamptz\"),\n\t\twritten(\"timestamptz({precision})\"),\n\t\tcatalog(\"timestamp with time zone\"),\n\t\tcatalog(\"timestamp({precision}) with time zone\")\n\t]\n});\n/** Every data type this target registers. */\nconst postgresDataTypes = [\n\tpgText,\n\tpgTextArray,\n\tpgEnum,\n\tpgInt2,\n\tpgBool,\n\tpgJson,\n\tpgTsquery,\n\tpgInt4,\n\tpgInt8,\n\tpgNumeric,\n\tpgFloat4,\n\tpgFloat8,\n\tpgJsonb,\n\tpgChar,\n\tpgVarchar,\n\tpgUuid,\n\tpgInet,\n\tpgBit,\n\tpgVarbit,\n\tpgTimetz,\n\tpgInterval,\n\tpgBytea,\n\tpgDate,\n\tpgTime,\n\tpgTimestamp,\n\tpgTimestamptz,\n\tsqlRawDataType\n];\n/** A lookup of the data types this target registers. */\nfunction createPostgresBuiltinDataTypeLookup() {\n\treturn assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}]).lookup;\n}\n/** Postgres's text data types: `text`, `character(n)` and `character varying(n)`. */\nconst postgresTextDataTypes = [\n\tpgText.id,\n\tpgChar.id,\n\tpgVarchar.id\n];\n//#endregion\nexport { postgresIntervalFields as $, pgTimestampStoredText as A, postgresTextDataTypes as B, pgNumericParams as C, pgTime as D, pgTextArray as E, pgTsquery as F, ISO_DURATION as G, isoYearText as H, pgUuid as I, intervalFieldsOf as J, MICROS_PER_SECOND as K, pgVarbit as L, pgTimestamptzStoredText as M, pgTimetz as N, pgTimeStoredText as O, pgTimetzStoredText as P, pgIntervalStoredText as Q, pgVarchar as R, pgNumeric as S, pgText as T, postgresYearText as U, qualifiedEnumName as V, BYTEA_TEXT as W, pgByteaFromHexText as X, microsFromFraction as Y, pgByteaHexText as Z, pgInt8 as _, pgBytea as a, pgJsonb as b, pgDate as c, pgEnumParams as d, pgFloat4 as f, pgInt4 as g, pgInt2 as h, pgBool as i, pgTimestamptz as j, pgTimestamp as k, pgDateStoredText as l, pgInet as m, pgBit as n, pgChar as o, pgFloat8 as p, formatIsoDuration as q, pgBitLengthParams as r, pgCharacterLengthParams as s, createPostgresBuiltinDataTypeLookup as t, pgEnum as u, pgInterval as v, pgPrecisionParams as w, pgJsonbEnumRefusal as x, pgJson as y, postgresDataTypes as z };\n\n//# sourceMappingURL=data-types-DklKHVmp.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,oBAAoB,MAAM,QAAQ,aAAa;CACvD,MAAM,cAAc,cAAc,gBAAgB,MAAM,GAAG,IAAI;CAC/D,OAAO,YAAY,UAAU,UAAU,CAAC,GAAG,WAAW,CAAC,CAAC,UAAU;AACnE;;AAEA,MAAM,aAAa;;;;AAInB,SAAS,WAAW,MAAM;CACzB,IAAI,CAAC,WAAW,KAAK,IAAI,GAAG,OAAO,KAAK;CACxC,MAAM,MAAM,KAA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gB;CAC/C,MAAM,mBAAmB,gBAAgB,uBAAuB,mFAAmF,gBAAgB;CACnK,OAAO,oBAAoB,qBAAqB;CAChD,QAAQ;CACR,WAAW;CACX,eAAe;CACf,OAAO;EACN,QAAQ,WAAW;EACnB,QAAQ,wBAAwB;EAChC,QAAQ,6BAA6B;EACrC,QAAQ,0CAA0C;CACnD;AACD,CAAC;AACD,MAAM,gBAAgB,YAAY,kBAAkB;CACnD,MAAM,mBAAmB,kBAAkB,yBAAyB,+EAA+E,gBAAgB;CACnK,OAAO,oBAAoB,uBAAuB;CAClD,QAAQ;CACR,WAAW;CACX,eAAe;CACf,OAAO;EACN,QAAQ,aAAa;EACrB,QAAQ,0BAA0B;EAClC,QAAQ,0BAA0B;EAClC,QAAQ,uCAAuC;CAChD;AACD,CAAC;;AAED,MAAM,oBAAoB;CACzB;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;;AAEA,SAAS,sCAAsC;CAC9C,OAAO,kBAAkB,CAAC;EACzB,IAAI;EACJ,WAAW;CACZ,CAAC,CAAC,CAAC,CAAC;AACL;;AAEA,MAAM,wBAAwB;CAC7B,OAAO;CACP,OAAO;CACP,UAAU;AACX"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MutationDefaultGeneratorDescriptor } from "@prisma/orm-framework/components/control";
|
|
2
2
|
import { Temporal } from "temporal-spec";
|
|
3
|
-
//#region ../../../3-targets/postgres/1-target/dist/date-time-now-generators-
|
|
3
|
+
//#region ../../../3-targets/postgres/1-target/dist/date-time-now-generators-BZj5G1E3.d.mts
|
|
4
4
|
//#region src/core/date-time-now-generators.d.ts
|
|
5
5
|
type GeneratorParams = Readonly<Record<string, unknown>> | undefined;
|
|
6
|
-
declare function instantNow(): Temporal.Instant;
|
|
7
|
-
declare function plainDateTimeNow(): Temporal.PlainDateTime;
|
|
6
|
+
declare function instantNow(params?: GeneratorParams): Temporal.Instant;
|
|
7
|
+
declare function plainDateTimeNow(params?: GeneratorParams): Temporal.PlainDateTime;
|
|
8
8
|
declare function plainDateNow(): Temporal.PlainDate;
|
|
9
9
|
declare function plainTimeNow(params?: GeneratorParams): Temporal.PlainTime;
|
|
10
10
|
declare function timestampStringNow(params?: GeneratorParams): string;
|
|
@@ -43,4 +43,4 @@ declare const postgresNowGenerators: readonly [{
|
|
|
43
43
|
declare function postgresNowGeneratorControlDescriptors(): readonly MutationDefaultGeneratorDescriptor[];
|
|
44
44
|
//#endregion
|
|
45
45
|
export { postgresNowGenerators as n, postgresNowGeneratorControlDescriptors as t };
|
|
46
|
-
//# sourceMappingURL=date-time-now-generators-
|
|
46
|
+
//# sourceMappingURL=date-time-now-generators-BZj5G1E3-BylrCrgW.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-now-generators-BZj5G1E3-BylrCrgW.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/date-time-now-generators-BZj5G1E3.d.mts"],"mappings":";;;;KAGK,kBAAkB,SAAS;iBACf,WAAW,SAAS,kBAAkB,SAAS;iBAC/C,iBAAiB,SAAS,kBAAkB,SAAS;iBACrD,gBAAgB,SAAS;iBACzB,aAAa,SAAS,kBAAkB,SAAS;iBACjD,mBAAmB,SAAS;iBAC5B,qBAAqB,SAAS;iBAC9B;iBACA,cAAc,SAAS;iBACvB,UAAU,SAAS;cACtB;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;iBAEX,mDAAmD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as postgresDataTypes } from "./data-types-
|
|
2
|
-
import { V as requireTemporal } from "./codecs-
|
|
3
|
-
//#region ../../../3-targets/postgres/1-target/dist/date-time-now-generators-
|
|
1
|
+
import { Y as postgresDataTypes } from "./data-types-DklKHVmp-Bl-nwUa-.mjs";
|
|
2
|
+
import { V as requireTemporal } from "./codecs-BqCmavY8-CC-ZbbTA.mjs";
|
|
3
|
+
//#region ../../../3-targets/postgres/1-target/dist/date-time-now-generators-Cc4PvFeB.mjs
|
|
4
4
|
const postgresTargetDescriptorMetaRuntime = {
|
|
5
5
|
kind: "target",
|
|
6
6
|
familyId: "sql",
|
|
@@ -12,7 +12,7 @@ const postgresTargetDescriptorMetaRuntime = {
|
|
|
12
12
|
sessionSettings: { DateStyle: "ISO" }
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* The Postgres "now" generators, one per date and time codec except `pg/timestamptz-date@1`, which
|
|
15
|
+
* The Postgres "now" generators, one per date and time codec except `pg/timestamptz-date@1` and `pg/timestamp-date@1`, which use the SQL family's `timestampNow`. All read the clock through `Date.now()` and write UTC. The time and timestamp generators round down to their `precision` param, so the column stores the value as written. The string generators are named after the codec they serve and write the codec's stored form (ADR 254, "Date and time types") in UTC, with milliseconds and no trailing zeros in the fraction.
|
|
16
16
|
*/
|
|
17
17
|
const INSTANT_NOW_GENERATOR_ID = "instantNow";
|
|
18
18
|
const PLAIN_DATE_TIME_NOW_GENERATOR_ID = "plainDateTimeNow";
|
|
@@ -25,6 +25,7 @@ const TIME_STRING_NOW_GENERATOR_ID = "timeStringNow";
|
|
|
25
25
|
const TIMETZ_NOW_GENERATOR_ID = "timetzNow";
|
|
26
26
|
const UTC_OFFSET = "Z";
|
|
27
27
|
const MAX_TIME_PRECISION = 6;
|
|
28
|
+
const MILLISECOND_DIGITS = 3;
|
|
28
29
|
function fractionDigitsOf(params) {
|
|
29
30
|
const precision = params?.["precision"];
|
|
30
31
|
return typeof precision === "number" ? precision : MAX_TIME_PRECISION;
|
|
@@ -52,14 +53,23 @@ function truncateTime(time, fractionDigits) {
|
|
|
52
53
|
roundingMode: "trunc"
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
56
|
+
function epochMillisecondsNow(fractionDigits = MAX_TIME_PRECISION) {
|
|
57
|
+
const now = Date.now();
|
|
58
|
+
if (fractionDigits >= MILLISECOND_DIGITS) return now;
|
|
59
|
+
const step = 10 ** (MILLISECOND_DIGITS - Math.max(fractionDigits, 0));
|
|
60
|
+
return Math.floor(now / step) * step;
|
|
57
61
|
}
|
|
58
|
-
function
|
|
59
|
-
return requireTemporal({ generatorId
|
|
62
|
+
function utcInstantNow(generatorId, fractionDigits) {
|
|
63
|
+
return requireTemporal({ generatorId }).Instant.fromEpochMilliseconds(epochMillisecondsNow(fractionDigits));
|
|
60
64
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
65
|
+
function utcDateTimeNow(generatorId, fractionDigits) {
|
|
66
|
+
return utcInstantNow(generatorId, fractionDigits).toZonedDateTimeISO("UTC");
|
|
67
|
+
}
|
|
68
|
+
function instantNow(params) {
|
|
69
|
+
return utcInstantNow(INSTANT_NOW_GENERATOR_ID, fractionDigitsOf(params));
|
|
70
|
+
}
|
|
71
|
+
function plainDateTimeNow(params) {
|
|
72
|
+
return utcDateTimeNow(PLAIN_DATE_TIME_NOW_GENERATOR_ID, fractionDigitsOf(params)).toPlainDateTime();
|
|
63
73
|
}
|
|
64
74
|
function plainDateNow() {
|
|
65
75
|
return utcDateTimeNow(PLAIN_DATE_NOW_GENERATOR_ID).toPlainDate();
|
|
@@ -127,4 +137,4 @@ function postgresNowGeneratorControlDescriptors() {
|
|
|
127
137
|
//#endregion
|
|
128
138
|
export { PLAIN_TIME_NOW_GENERATOR_ID as a, TIMETZ_NOW_GENERATOR_ID as c, postgresNowGenerators as d, postgresTargetDescriptorMetaRuntime as f, PLAIN_DATE_TIME_NOW_GENERATOR_ID as i, TIME_STRING_NOW_GENERATOR_ID as l, INSTANT_NOW_GENERATOR_ID as n, TIMESTAMPTZ_STRING_NOW_GENERATOR_ID as o, PLAIN_DATE_NOW_GENERATOR_ID as r, TIMESTAMP_STRING_NOW_GENERATOR_ID as s, DATE_STRING_NOW_GENERATOR_ID as t, postgresNowGeneratorControlDescriptors as u };
|
|
129
139
|
|
|
130
|
-
//# sourceMappingURL=date-time-now-generators-
|
|
140
|
+
//# sourceMappingURL=date-time-now-generators-Cc4PvFeB-XQWJz_4f.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-now-generators-Cc4PvFeB-XQWJz_4f.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/date-time-now-generators-Cc4PvFeB.mjs"],"sourcesContent":["import { z as postgresDataTypes } from \"./data-types-DklKHVmp.mjs\";\nimport { V as requireTemporal } from \"./codecs-BqCmavY8.mjs\";\nconst postgresTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: postgresDataTypes,\n\tsessionSettings: { DateStyle: \"ISO\" }\n};\n//#endregion\n//#region src/core/date-time-now-generators.ts\n/**\n* The Postgres \"now\" generators, one per date and time codec except `pg/timestamptz-date@1` and `pg/timestamp-date@1`, which use the SQL family's `timestampNow`. All read the clock through `Date.now()` and write UTC. The time and timestamp generators round down to their `precision` param, so the column stores the value as written. The string generators are named after the codec they serve and write the codec's stored form (ADR 254, \"Date and time types\") in UTC, with milliseconds and no trailing zeros in the fraction.\n*/\nconst INSTANT_NOW_GENERATOR_ID = \"instantNow\";\nconst PLAIN_DATE_TIME_NOW_GENERATOR_ID = \"plainDateTimeNow\";\nconst PLAIN_DATE_NOW_GENERATOR_ID = \"plainDateNow\";\nconst PLAIN_TIME_NOW_GENERATOR_ID = \"plainTimeNow\";\nconst TIMESTAMP_STRING_NOW_GENERATOR_ID = \"timestampStringNow\";\nconst TIMESTAMPTZ_STRING_NOW_GENERATOR_ID = \"timestamptzStringNow\";\nconst DATE_STRING_NOW_GENERATOR_ID = \"dateStringNow\";\nconst TIME_STRING_NOW_GENERATOR_ID = \"timeStringNow\";\nconst TIMETZ_NOW_GENERATOR_ID = \"timetzNow\";\nconst UTC_OFFSET = \"Z\";\nconst MAX_TIME_PRECISION = 6;\nconst MILLISECOND_DIGITS = 3;\nfunction fractionDigitsOf(params) {\n\tconst precision = params?.[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : MAX_TIME_PRECISION;\n}\nfunction utcNow(fractionDigits = MAX_TIME_PRECISION) {\n\tconst iso = new Date(Date.now()).toISOString();\n\tconst [wholeSeconds = \"\", fraction = \"\"] = iso.slice(11, -1).split(\".\");\n\tconst kept = fraction.slice(0, fractionDigits).replace(/0+$/, \"\");\n\treturn {\n\t\tdate: iso.slice(0, 10),\n\t\ttime: kept === \"\" ? wholeSeconds : `${wholeSeconds}.${kept}`\n\t};\n}\n/** Rounds down, so PostgreSQL stores the value without rounding it up, which can reach `24:00:00`. */\nfunction truncateTime(time, fractionDigits) {\n\tif (fractionDigits <= 0) return time.round({\n\t\tsmallestUnit: \"second\",\n\t\troundingMode: \"trunc\"\n\t});\n\tconst smallestUnit = fractionDigits <= 3 ? \"millisecond\" : \"microsecond\";\n\tconst unitDigits = fractionDigits <= 3 ? 3 : 6;\n\treturn time.round({\n\t\tsmallestUnit,\n\t\troundingIncrement: 10 ** (unitDigits - Math.min(fractionDigits, unitDigits)),\n\t\troundingMode: \"trunc\"\n\t});\n}\nfunction epochMillisecondsNow(fractionDigits = MAX_TIME_PRECISION) {\n\tconst now = Date.now();\n\tif (fractionDigits >= MILLISECOND_DIGITS) return now;\n\tconst step = 10 ** (MILLISECOND_DIGITS - Math.max(fractionDigits, 0));\n\treturn Math.floor(now / step) * step;\n}\nfunction utcInstantNow(generatorId, fractionDigits) {\n\treturn requireTemporal({ generatorId }).Instant.fromEpochMilliseconds(epochMillisecondsNow(fractionDigits));\n}\nfunction utcDateTimeNow(generatorId, fractionDigits) {\n\treturn utcInstantNow(generatorId, fractionDigits).toZonedDateTimeISO(\"UTC\");\n}\nfunction instantNow(params) {\n\treturn utcInstantNow(INSTANT_NOW_GENERATOR_ID, fractionDigitsOf(params));\n}\nfunction plainDateTimeNow(params) {\n\treturn utcDateTimeNow(PLAIN_DATE_TIME_NOW_GENERATOR_ID, fractionDigitsOf(params)).toPlainDateTime();\n}\nfunction plainDateNow() {\n\treturn utcDateTimeNow(PLAIN_DATE_NOW_GENERATOR_ID).toPlainDate();\n}\nfunction plainTimeNow(params) {\n\treturn truncateTime(utcDateTimeNow(PLAIN_TIME_NOW_GENERATOR_ID).toPlainTime(), fractionDigitsOf(params));\n}\nfunction timestampStringNow(params) {\n\tconst { date, time } = utcNow(fractionDigitsOf(params));\n\treturn `${date}T${time}`;\n}\nfunction timestamptzStringNow(params) {\n\treturn `${timestampStringNow(params)}${UTC_OFFSET}`;\n}\nfunction dateStringNow() {\n\treturn utcNow().date;\n}\nfunction timeStringNow(params) {\n\treturn utcNow(fractionDigitsOf(params)).time;\n}\nfunction timetzNow(params) {\n\treturn `${timeStringNow(params)}${UTC_OFFSET}`;\n}\nconst postgresNowGenerators = [\n\t{\n\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\tgenerate: instantNow\n\t},\n\t{\n\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\tgenerate: plainDateTimeNow\n\t},\n\t{\n\t\tid: PLAIN_DATE_NOW_GENERATOR_ID,\n\t\tgenerate: plainDateNow\n\t},\n\t{\n\t\tid: PLAIN_TIME_NOW_GENERATOR_ID,\n\t\tgenerate: plainTimeNow\n\t},\n\t{\n\t\tid: TIMESTAMP_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: timestampStringNow\n\t},\n\t{\n\t\tid: TIMESTAMPTZ_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: timestamptzStringNow\n\t},\n\t{\n\t\tid: DATE_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: dateStringNow\n\t},\n\t{\n\t\tid: TIME_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: timeStringNow\n\t},\n\t{\n\t\tid: TIMETZ_NOW_GENERATOR_ID,\n\t\tgenerate: timetzNow\n\t}\n];\nfunction postgresNowGeneratorControlDescriptors() {\n\treturn postgresNowGenerators.map(({ id }) => ({ id }));\n}\n//#endregion\nexport { PLAIN_TIME_NOW_GENERATOR_ID as a, TIMETZ_NOW_GENERATOR_ID as c, postgresNowGenerators as d, postgresTargetDescriptorMetaRuntime as f, PLAIN_DATE_TIME_NOW_GENERATOR_ID as i, TIME_STRING_NOW_GENERATOR_ID as l, INSTANT_NOW_GENERATOR_ID as n, TIMESTAMPTZ_STRING_NOW_GENERATOR_ID as o, PLAIN_DATE_NOW_GENERATOR_ID as r, TIMESTAMP_STRING_NOW_GENERATOR_ID as s, DATE_STRING_NOW_GENERATOR_ID as t, postgresNowGeneratorControlDescriptors as u };\n\n//# sourceMappingURL=date-time-now-generators-Cc4PvFeB.mjs.map"],"mappings":";;;AAEA,MAAM,sCAAsC;CAC3C,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;CACX,iBAAiB,EAAE,WAAW,MAAM;AACrC;;;;AAMA,MAAM,2BAA2B;AACjC,MAAM,mCAAmC;AACzC,MAAM,8BAA8B;AACpC,MAAM,8BAA8B;AACpC,MAAM,oCAAoC;AAC1C,MAAM,sCAAsC;AAC5C,MAAM,+BAA+B;AACrC,MAAM,+BAA+B;AACrC,MAAM,0BAA0B;AAChC,MAAM,aAAa;AACnB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,SAAS,iBAAiB,QAAQ;CACjC,MAAM,YAAY,SAAS;CAC3B,OAAO,OAAO,cAAc,WAAW,YAAY;AACpD;AACA,SAAS,OAAO,iBAAiB,oBAAoB;CACpD,MAAM,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY;CAC7C,MAAM,CAAC,eAA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SAAS,aAAa,QAAQ;CAC7B,OAAO,aAAa,eAAe,2BAA2B,CAAC,CAAC,YAAY,GAAG,iBAAiB,MAAM,CAAC;AACxG;AACA,SAAS,mBAAmB,QAAQ;CACnC,MAAM,EAAE,MAAM,SAAS,OAAO,iBAAiB,MAAM,CAAC;CACtD,OAAO,GAAG,KAAK,GAAG;AACnB;AACA,SAAS,qBAAqB,QAAQ;CACrC,OAAO,GAAG,mBAAmB,MAAM,IAAI;AACxC;AACA,SAAS,gBAAgB;CACxB,OAAO,OAAO,CAAC,CAAC;AACjB;AACA,SAAS,cAAc,QAAQ;CAC9B,OAAO,OAAO,iBAAiB,MAAM,CAAC,CAAC,CAAC;AACzC;AACA,SAAS,UAAU,QAAQ;CAC1B,OAAO,GAAG,cAAc,MAAM,IAAI;AACnC;AACA,MAAM,wBAAwB;CAC7B;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;AACD;AACA,SAAS,yCAAyC;CACjD,OAAO,sBAAsB,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE;AACtD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { C as PG_TEXT_CODEC_ID, n as PG_BOOL_CODEC_ID } from "./codec-ids-D0wjQdEW-EypD_iZj.mjs";
|
|
2
|
-
import { h as postgresCreateNamespace, l as PostgresTableSource } from "./postgres-schema-
|
|
2
|
+
import { h as postgresCreateNamespace, l as PostgresTableSource } from "./postgres-schema-CEGf780E-cyGo2Sii.mjs";
|
|
3
3
|
import { _ as PostgresDropIndex, a as PostgresAlterIndexRename, b as PostgresDropType, c as PostgresAlterTable, d as PostgresCreatePolicy, f as PostgresCreateSchema, g as PostgresDisableRowLevelSecurity, i as DropDefaultAction, l as PostgresAlterTableSetSchema, m as PostgresCreateType, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresCreateTable, r as AlterColumnTypeAction, s as PostgresAlterSchemaRename, t as AddColumnAction, u as PostgresCreateIndex, v as PostgresDropPolicy, y as PostgresDropSchema } from "./nodes-G8VTh4PM-DNvIhHag.mjs";
|
|
4
4
|
import { opaqueSql } from "@prisma/orm-family-sql/relational-core/ast";
|
|
5
5
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
6
6
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
7
7
|
import { cfExpr, cfTable, exprSelect } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
8
|
-
//#region ../../../3-targets/postgres/1-target/dist/ddl-
|
|
8
|
+
//#region ../../../3-targets/postgres/1-target/dist/ddl-LpR9foVX.mjs
|
|
9
9
|
/**
|
|
10
10
|
* `to_regclass($1)` with the qualified table name bound as a text parameter.
|
|
11
11
|
* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target
|
|
@@ -644,4 +644,4 @@ function dropSchema(options) {
|
|
|
644
644
|
//#endregion
|
|
645
645
|
export { indexDefinitionAst as A, schemaHoldsNoObjectsAst as B, disableRowLevelSecurity as C, dropSchema as D, dropPolicy as E, relationKindAst as F, tablePrimaryKeyAst as G, sequenceValuesFitAst as H, rlsEnabledAst as I, toRegclass as K, rlsPolicyDefinitionAst as L, nativeEnumTypeExistsAst as M, nativeEnumValueExistsAst as N, dropType as O, noNullValuesAst as P, rlsPolicyExistsAst as R, createType as S, dropIndex as T, tableExistsAst as U, sequenceNameAvailableAst as V, tableIsEmptyAst as W, constraintExistsAst as _, alterPolicyRename as a, createSchema as b, alterTableSetSchema as c, columnExistsAst as d, columnNullabilityAst as f, constraintDefinitionAst as g, columnTypeOidAst as h, alterIndexRename as i, indexExistsAst as j, extensionExistsAst as k, columnDefaultAst as l, columnTypeAst as m, addConstraintAction as n, alterSchemaRename as o, columnOwnsSequenceAst as p, unboundTableMovedAst as q, alterColumnTypeAction as r, alterTable as s, addColumnAction as t, columnDefaultSequenceAst as u, createIndex as v, dropDefaultAction as w, createTable as x, createPolicy as y, schemaExistsAst as z };
|
|
646
646
|
|
|
647
|
-
//# sourceMappingURL=ddl-
|
|
647
|
+
//# sourceMappingURL=ddl-LpR9foVX-YBmyKx74.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl-DiUFjVZe-DETlNlJh.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/ddl-DiUFjVZe.mjs"],"sourcesContent":["import { C as PG_TEXT_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-D0wjQdEW.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-CNNW8eA3.mjs\";\nimport { _ as PostgresDropIndex, a as PostgresAlterIndexRename, b as PostgresDropType, c as PostgresAlterTable, d as PostgresCreatePolicy, f as PostgresCreateSchema, g as PostgresDisableRowLevelSecurity, i as DropDefaultAction, l as PostgresAlterTableSetSchema, m as PostgresCreateType, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresCreateTable, r as AlterColumnTypeAction, s as PostgresAlterSchemaRename, t as AddColumnAction, u as PostgresCreateIndex, v as PostgresDropPolicy, y as PostgresDropSchema } from \"./nodes-G8VTh4PM.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed check that a column takes its default from the sequence it owns: the column's default (`pg_attrdef`) depends on the sequence `pg_get_serial_sequence` finds for it. A `nextval(...)` default records that dependency on the sequence it reads, so a default that reads another sequence, an earlier default, or no default does not pass. It compares catalog identities, never the default's text.\n*/\nfunction columnDefaultSequenceAst(options) {\n\tconst regclassOf = (catalog) => cfExpr.raw(`'${catalog}'::regclass`, {\n\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\tnullable: false\n\t});\n\tconst defaultOnOwnedSequence = exprSelect().from(cfTable(\"pg_attrdef\", \"d\")).join(cfTable(\"pg_attribute\", \"a\"), cfExpr.columnRef(\"a\", \"attrelid\").eqExpr(cfExpr.columnRef(\"d\", \"adrelid\")).and(cfExpr.columnRef(\"a\", \"attnum\").eqExpr(cfExpr.columnRef(\"d\", \"adnum\")))).join(cfTable(\"pg_depend\", \"dep\"), cfExpr.columnRef(\"dep\", \"objid\").eqExpr(cfExpr.columnRef(\"d\", \"oid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"d\", \"adrelid\").eqExpr(toRegclass(checkNamespace(options.schema).qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"dep\", \"classid\").eqExpr(regclassOf(\"pg_attrdef\")),\n\t\tcfExpr.columnRef(\"dep\", \"refclassid\").eqExpr(regclassOf(\"pg_class\")),\n\t\tcfExpr.columnRef(\"dep\", \"refobjid\").eqExpr(ownedSequenceOf(options))\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(defaultOnOwnedSequence)).build();\n}\n/**\n* The sequence the column owns, as a `regclass`, found in the catalog with `pg_get_serial_sequence`; `NULL` when it owns none. A SERIAL column and an identity column both own one, and it keeps its name when the table or column is renamed.\n*/\nfunction ownedSequenceOf(location) {\n\treturn cfExpr.fn({\n\t\tmethod: \"pg_get_serial_sequence\",\n\t\ttemplate: \"pg_get_serial_sequence({{self}}, {{arg0}})::regclass\",\n\t\tself: cfExpr.param(checkNamespace(location.schema).qualifyTable(location.table), PG_TEXT_CODEC_ID),\n\t\targs: [cfExpr.param(location.column, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed check that a column's autoincrement default has a sequence to use: the column already owns one, whatever its name, or no relation has the name `sequence`, which the operation creates.\n*/\nfunction sequenceNameAvailableAst(options) {\n\tconst qualifiedSequence = checkNamespace(options.schema).qualifyTable(options.sequence);\n\treturn exprSelect().project(\"result\", ownedSequenceOf(options).isNotNull().or(toRegclass(qualifiedSequence).isNull())).build();\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Whether the attribute numbers in `keys` (an `int2[]` or `int2vector` such as `pg_constraint.conkey` or `pg_index.indkey`) name, in order, exactly the columns `names` of the relation `relation`. Key `0`, an expression slot of an index, names no column.\n*/\nfunction keyColumnsAre(keys, relation, names) {\n\treturn cfExpr.fn({\n\t\tmethod: \"key_columns_are\",\n\t\ttemplate: \"(SELECT coalesce(jsonb_agg(key_attribute.attname ORDER BY key_column.position), '[]'::jsonb) FROM unnest({{self}}::int2[]) WITH ORDINALITY AS key_column(attnum, position) JOIN pg_attribute key_attribute ON key_attribute.attrelid = {{arg0}} AND key_attribute.attnum = key_column.attnum) = ({{arg1}})::jsonb\",\n\t\tself: keys,\n\t\targs: [relation, cfExpr.param(JSON.stringify(names), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n}\n/**\n* Typed check that the relation `name` exists and its `pg_class.relkind` is one of `kinds`, so a view, sequence or index of the same name does not pass as a table.\n*/\nfunction relationKindAst(options) {\n\tconst relation = toRegclass(checkNamespace(options.schema).qualifyTable(options.name));\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"c\", \"oid\").eqExpr(relation), options.kinds.map((kind) => cfExpr.columnRef(\"c\", \"relkind\").eqParam(kind, PG_TEXT_CODEC_ID)).reduce((either, kind) => either.or(kind))]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the constraint `constraintName` on `table` is of kind `contype` (`p`, `u`, `f` or `c`), on the columns `columns` in order when given, and for a foreign key, references `foreignKey`'s table and columns in order with its delete and update actions. It reads only catalog values, never the text Postgres prints for a constraint.\n*/\nfunction constraintDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"c\", \"contype\").eqParam(options.contype, PG_TEXT_CODEC_ID)\n\t];\n\tif (options.columns !== void 0) conditions.push(keyColumnsAre(cfExpr.columnRef(\"c\", \"conkey\"), cfExpr.columnRef(\"c\", \"conrelid\"), options.columns));\n\tconst foreignKey = options.foreignKey;\n\tif (foreignKey !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"confrelid\").eqExpr(toRegclass(checkNamespace(foreignKey.referencedSchema).qualifyTable(foreignKey.referencedTable))), keyColumnsAre(cfExpr.columnRef(\"c\", \"confkey\"), cfExpr.columnRef(\"c\", \"confrelid\"), foreignKey.referencedColumns), cfExpr.columnRef(\"c\", \"confdeltype\").eqParam(foreignKey.onDelete, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"c\", \"confupdtype\").eqParam(foreignKey.onUpdate, PG_TEXT_CODEC_ID));\n\tconst inner = exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that `index` is an index on `table` with the given uniqueness and access method, on the columns `columns` in order, and with or without a predicate. For an index written as an element list (`expression`) it checks no elements: the list can be a real expression, which Postgres stores in `indexprs`, or plain columns with a sort order, operator class or collation, which it stores as columns, and comparing its text would need the form Postgres prints.\n*/\nfunction indexDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst indexColumn = (name) => cfExpr.columnRef(\"i\", name);\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_index\", \"i\"), cfExpr.columnRef(\"i\", \"indexrelid\").eqExpr(cfExpr.columnRef(\"c\", \"oid\"))).join(cfTable(\"pg_am\", \"m\"), cfExpr.columnRef(\"m\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relam\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"c\", \"oid\").eqExpr(toRegclass(namespace.qualifyTable(options.index))),\n\t\tcfExpr.columnRef(\"c\", \"relkind\").eqParam(\"i\", PG_TEXT_CODEC_ID).or(cfExpr.columnRef(\"c\", \"relkind\").eqParam(\"I\", PG_TEXT_CODEC_ID)),\n\t\tindexColumn(\"indrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\toptions.unique ? indexColumn(\"indisunique\") : indexColumn(\"indisunique\").not(),\n\t\tcfExpr.columnRef(\"m\", \"amname\").eqParam(options.method, PG_TEXT_CODEC_ID),\n\t\t...\"columns\" in options.elements ? [indexColumn(\"indexprs\").isNull().and(keyColumnsAre(indexColumn(\"indkey\"), indexColumn(\"indrelid\"), options.elements.columns))] : [],\n\t\toptions.hasPredicate ? indexColumn(\"indpred\").isNotNull() : indexColumn(\"indpred\").isNull()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the RLS policy `policyName` on `table` exists with the command `command` (as `pg_policies.cmd` prints it, such as `ALL` or `SELECT`), the permissive flag, and exactly the roles `roles`, in any order. A role written as `current_user`, `current_role` or `session_user` stands for the role it names in the session that runs the check, as `CREATE POLICY` resolves it. It never compares the policy's expressions.\n*/\nfunction rlsPolicyDefinitionAst(options) {\n\tconst rolesAre = cfExpr.fn({\n\t\tmethod: \"roles_are\",\n\t\ttemplate: `(SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT policy_role::text COLLATE \"C\" AS role_name FROM unnest({{self}}) AS policy_role) AS actual_roles) = (SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT (CASE expected_role WHEN 'current_user' THEN current_user::text WHEN 'current_role' THEN current_role::text WHEN 'session_user' THEN session_user::text ELSE expected_role END) COLLATE \"C\" AS role_name FROM jsonb_array_elements_text(({{arg0}})::jsonb) AS expected_role) AS expected_roles)`,\n\t\tself: cfExpr.identifierRef(\"roles\"),\n\t\targs: [cfExpr.param(JSON.stringify(options.roles), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"cmd\").eqParam(options.command, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"permissive\").eqParam(options.permissive ? \"PERMISSIVE\" : \"RESTRICTIVE\", PG_TEXT_CODEC_ID),\n\t\trolesAre\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the column owns a sequence, whatever its name, of the type `sequenceType` (`smallint`, `integer` or `bigint`). With `orNone`, a column that owns no sequence passes too.\n*/\nfunction columnOwnsSequenceAst(options) {\n\tconst ownedSequence = ownedSequenceOf(options);\n\tconst sequenceType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.sequenceType, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst sequenceOfType = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequence), cfExpr.columnRef(\"s\", \"seqtypid\").eqExpr(sequenceType)]));\n\treturn exprSelect().project(\"result\", options.orNone ? ownedSequence.isNull().or(cfExpr.exists(sequenceOfType)) : ownedSequence.isNotNull().and(cfExpr.exists(sequenceOfType))).build();\n}\n/**\n* Typed column-type check by the type's identity: compares the column's `pg_attribute.atttypid` with `to_regtype(type)`, or with that type's array type for a list. It checks a type that claims a kind, such as an enum, whatever schema it is in, and a type the stack's data types do not read. `to_regtype` drops a type modifier, so `varchar(20)` matches any `varchar`.\n*/\nfunction columnTypeOidAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst expectedType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: options.many ? \"(SELECT \\\"t\\\".\\\"typarray\\\" FROM \\\"pg_catalog\\\".\\\"pg_type\\\" AS \\\"t\\\" WHERE \\\"t\\\".\\\"oid\\\" = to_regtype({{self}}))\" : \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.type, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"a\", \"attrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"atttypid\").eqExpr(expectedType),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the sequence the column owns has handed out no value above `maxValue`, so narrowing it to a smaller integer type keeps every value it already gave. The sequence's position is read only when its current maximum is above `maxValue`, that is when the change narrows it, so widening needs no rights on the sequence. A sequence that has never been read, and a column that owns none, pass.\n*/\nfunction sequenceValuesFitAst(options) {\n\tconst pastMax = cfExpr.fn({\n\t\tmethod: \"sequence_past_max\",\n\t\ttemplate: \"CASE WHEN {{self}} <= ({{arg0}})::bigint THEN false ELSE coalesce(pg_sequence_last_value(\\\"s\\\".\\\"seqrelid\\\"), 0) > ({{arg0}})::bigint END\",\n\t\tself: cfExpr.columnRef(\"s\", \"seqmax\"),\n\t\targs: [cfExpr.param(options.maxValue, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst narrowedPastMax = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequenceOf(options)).and(pastMax));\n\treturn exprSelect().project(\"result\", cfExpr.notExists(narrowedPastMax)).build();\n}\n/** Typed schema existence check over `pg_namespace`, with the schema name bound as a text parameter. */\nfunction schemaExistsAst(schema) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_namespace\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"nspname\").eqParam(schema, PG_TEXT_CODEC_ID));\n\treturn {\n\t\tschemaPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tschemaAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction objectsInSchema(catalog, namespaceColumn, schema, only = []) {\n\treturn exprSelect().from(cfTable(catalog, \"o\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"o\", namespaceColumn))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID), ...only]));\n}\n/**\n* Whether a schema holds no relations (tables, views, sequences, indexes), no types of its own and\n* no functions, so `DROP SCHEMA` without `CASCADE` succeeds. A table's row type and an array type\n* belong to another object and are not counted.\n*/\nfunction schemaHoldsNoObjectsAst(schema) {\n\treturn exprSelect().project(\"result\", cfExpr.allOf([\n\t\tcfExpr.notExists(objectsInSchema(\"pg_class\", \"relnamespace\", schema)),\n\t\tcfExpr.notExists(objectsInSchema(\"pg_type\", \"typnamespace\", schema, [cfExpr.columnRef(\"o\", \"typrelid\").eqLit(0), cfExpr.columnRef(\"o\", \"typelem\").eqLit(0)])),\n\t\tcfExpr.notExists(objectsInSchema(\"pg_proc\", \"pronamespace\", schema))\n\t])).build();\n}\n/**\n* After a table of the unbound namespace moves to `toSchema`: the search path finds no table of that\n* name, or finds only the moved one, which it does when `toSchema` is on the search path.\n*/\nfunction unboundTableMovedAst(table, toSchema) {\n\tconst found = toRegclass(checkNamespace(UNBOUND_NAMESPACE_ID).qualifyTable(table));\n\tconst moved = toRegclass(checkNamespace(toSchema).qualifyTable(table));\n\treturn exprSelect().project(\"result\", found.isNull().or(found.eqExpr(moved))).build();\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build an `ADD CONSTRAINT` action for use inside {@link alterTable}. The renderer writes the constraint as `CREATE TABLE` writes it.\n*/\nfunction addConstraintAction(constraint) {\n\treturn new AddConstraintAction(constraint);\n}\n/**\n* Build an `ALTER COLUMN \"<columnName>\" TYPE <type> USING …` action for use inside {@link alterTable}. `type` is written verbatim; `using` is opaque SQL, and when it is absent or empty the conversion is `\"<columnName>\"::<type>`.\n*/\nfunction alterColumnTypeAction(options) {\n\treturn new AlterColumnTypeAction({\n\t\tcolumnName: options.columnName,\n\t\ttype: options.type,\n\t\tusing: options.using ? opaqueSql(options.using) : void 0\n\t});\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction}, {@link dropDefaultAction}, {@link addConstraintAction} and {@link alterColumnTypeAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … SET SCHEMA` DDL node. Identifiers are quoted by the renderer; an\n* absent `schema` leaves the table unqualified (the unbound namespace).\n*/\nfunction alterTableSetSchema(options) {\n\treturn new PostgresAlterTableSetSchema(options);\n}\n/** Build a Postgres `ALTER SCHEMA … RENAME TO` DDL node. Identifiers are quoted by the renderer. */\nfunction alterSchemaRename(options) {\n\treturn new PostgresAlterSchemaRename(options);\n}\n/** Build a Postgres `DROP SCHEMA` DDL node, without `CASCADE`. The name is quoted by the renderer. */\nfunction dropSchema(options) {\n\treturn new PostgresDropSchema(options);\n}\n//#endregion\nexport { indexDefinitionAst as A, schemaHoldsNoObjectsAst as B, columnNullabilityAst as C, constraintDefinitionAst as D, columnTypeOidAst as E, relationKindAst as F, tablePrimaryKeyAst as G, sequenceValuesFitAst as H, rlsEnabledAst as I, toRegclass as K, rlsPolicyDefinitionAst as L, nativeEnumTypeExistsAst as M, nativeEnumValueExistsAst as N, constraintExistsAst as O, noNullValuesAst as P, rlsPolicyExistsAst as R, columnExistsAst as S, columnTypeAst as T, tableExistsAst as U, sequenceNameAvailableAst as V, tableIsEmptyAst as W, dropPolicy as _, alterPolicyRename as a, columnDefaultAst as b, alterTableSetSchema as c, createSchema as d, createTable as f, dropIndex as g, dropDefaultAction as h, alterIndexRename as i, indexExistsAst as j, extensionExistsAst as k, createIndex as l, disableRowLevelSecurity as m, addConstraintAction as n, alterSchemaRename as o, createType as p, unboundTableMovedAst as q, alterColumnTypeAction as r, alterTable as s, addColumnAction as t, createPolicy as u, dropSchema as v, columnOwnsSequenceAst as w, columnDefaultSequenceAst as x, dropType as y, schemaExistsAst as z };\n\n//# sourceMappingURL=ddl-DiUFjVZe.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,WAAW,eAAe;CAClC,OAAO,OAAO,GAAG;EAChB,QAAQ;EACR,UAAU;EACV,MAAM,OAAO,MAAM,eAAe,gBAAgB;EAClD,SAAS;GACR,SAAS;GACT,UAAU;EACX;CACD,CAAC;AACF;;;;;;;;;;AAUA,SAAS,eAAe,QAAQ,OAAO;CACtC,MAAM,WAAW,WAAW,wBAAwB;EACnD,IAAI;EACJ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC;CACtB,OAAO;EACN,mBAAmB,WAAW,CAAC,CAAC,QAAQ,UAAU,SAAS,OAAO,CAAC,CAAC,CAAC,MAAM;EAC3E,oBAAoB,WAAW,CAAC,CAAC,QAAQ,UAAU,SAAS,UAAU,CAAC,CAAC,CAAC,MAAM;CAChF;AACD;;;;;;;;;;;;;;;AAeA,SAAS,oBAAoB,SAAS;CACrC,MAAM,YAAY,wBAAwB;EACzC,IAAI,QAAQ;EACZ,SAAS,EAAE,OAAO,CAAC,EA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,OAAO;AACtC;;;;;AAKA,SAAS,kBAAkB,SAAS;CACnC,OAAO,IAAI,0BAA0B,OAAO;AAC7C;;;;;;;;AAQA,SAAS,YAAY,SAAS;CAC7B,MAAM,EAAE,UAAU,OAAO,GAAG,SAAS;CACrC,OAAO,IAAI,oBAAoB;EAC9B,GAAG;EACH,UAAU,aAAa,WAAW,EAAE,SAAS,SAAS,QAAQ,IAAI,EAAE,YAAY,UAAU,SAAS,UAAU,EAAE;EAC/G,OAAO,UAAU,KAAK,IAAI,KAAK,IAAI,UAAU,KAAK;CACnD,CAAC;AACF;;;;;AAKA,SAAS,UAAU,SAAS;CAC3B,OAAO,IAAI,kBAAkB,OAAO;AACrC;;;;;AAKA,SAAS,iBAAiB,SAAS;CAClC,OAAO,IAAI,yBAAyB,OAAO;AAC5C;;;;;AAKA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,gCAAgC,OAAO;AACnD;;;;;AAKA,SAAS,oBAAoB,SAAS;CACrC,OAAO,IAAI,4BAA4B,OAAO;AAC/C;;AAEA,SAAS,kBAAkB,SAAS;CACnC,OAAO,IAAI,0BAA0B,OAAO;AAC7C;;AAEA,SAAS,WAAW,SAAS;CAC5B,OAAO,IAAI,mBAAmB,OAAO;AACtC"}
|
|
1
|
+
{"version":3,"file":"ddl-LpR9foVX-YBmyKx74.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/ddl-LpR9foVX.mjs"],"sourcesContent":["import { C as PG_TEXT_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-D0wjQdEW.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-CEGf780E.mjs\";\nimport { _ as PostgresDropIndex, a as PostgresAlterIndexRename, b as PostgresDropType, c as PostgresAlterTable, d as PostgresCreatePolicy, f as PostgresCreateSchema, g as PostgresDisableRowLevelSecurity, i as DropDefaultAction, l as PostgresAlterTableSetSchema, m as PostgresCreateType, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresCreateTable, r as AlterColumnTypeAction, s as PostgresAlterSchemaRename, t as AddColumnAction, u as PostgresCreateIndex, v as PostgresDropPolicy, y as PostgresDropSchema } from \"./nodes-G8VTh4PM.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed check that a column takes its default from the sequence it owns: the column's default (`pg_attrdef`) depends on the sequence `pg_get_serial_sequence` finds for it. A `nextval(...)` default records that dependency on the sequence it reads, so a default that reads another sequence, an earlier default, or no default does not pass. It compares catalog identities, never the default's text.\n*/\nfunction columnDefaultSequenceAst(options) {\n\tconst regclassOf = (catalog) => cfExpr.raw(`'${catalog}'::regclass`, {\n\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\tnullable: false\n\t});\n\tconst defaultOnOwnedSequence = exprSelect().from(cfTable(\"pg_attrdef\", \"d\")).join(cfTable(\"pg_attribute\", \"a\"), cfExpr.columnRef(\"a\", \"attrelid\").eqExpr(cfExpr.columnRef(\"d\", \"adrelid\")).and(cfExpr.columnRef(\"a\", \"attnum\").eqExpr(cfExpr.columnRef(\"d\", \"adnum\")))).join(cfTable(\"pg_depend\", \"dep\"), cfExpr.columnRef(\"dep\", \"objid\").eqExpr(cfExpr.columnRef(\"d\", \"oid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"d\", \"adrelid\").eqExpr(toRegclass(checkNamespace(options.schema).qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"dep\", \"classid\").eqExpr(regclassOf(\"pg_attrdef\")),\n\t\tcfExpr.columnRef(\"dep\", \"refclassid\").eqExpr(regclassOf(\"pg_class\")),\n\t\tcfExpr.columnRef(\"dep\", \"refobjid\").eqExpr(ownedSequenceOf(options))\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(defaultOnOwnedSequence)).build();\n}\n/**\n* The sequence the column owns, as a `regclass`, found in the catalog with `pg_get_serial_sequence`; `NULL` when it owns none. A SERIAL column and an identity column both own one, and it keeps its name when the table or column is renamed.\n*/\nfunction ownedSequenceOf(location) {\n\treturn cfExpr.fn({\n\t\tmethod: \"pg_get_serial_sequence\",\n\t\ttemplate: \"pg_get_serial_sequence({{self}}, {{arg0}})::regclass\",\n\t\tself: cfExpr.param(checkNamespace(location.schema).qualifyTable(location.table), PG_TEXT_CODEC_ID),\n\t\targs: [cfExpr.param(location.column, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed check that a column's autoincrement default has a sequence to use: the column already owns one, whatever its name, or no relation has the name `sequence`, which the operation creates.\n*/\nfunction sequenceNameAvailableAst(options) {\n\tconst qualifiedSequence = checkNamespace(options.schema).qualifyTable(options.sequence);\n\treturn exprSelect().project(\"result\", ownedSequenceOf(options).isNotNull().or(toRegclass(qualifiedSequence).isNull())).build();\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Whether the attribute numbers in `keys` (an `int2[]` or `int2vector` such as `pg_constraint.conkey` or `pg_index.indkey`) name, in order, exactly the columns `names` of the relation `relation`. Key `0`, an expression slot of an index, names no column.\n*/\nfunction keyColumnsAre(keys, relation, names) {\n\treturn cfExpr.fn({\n\t\tmethod: \"key_columns_are\",\n\t\ttemplate: \"(SELECT coalesce(jsonb_agg(key_attribute.attname ORDER BY key_column.position), '[]'::jsonb) FROM unnest({{self}}::int2[]) WITH ORDINALITY AS key_column(attnum, position) JOIN pg_attribute key_attribute ON key_attribute.attrelid = {{arg0}} AND key_attribute.attnum = key_column.attnum) = ({{arg1}})::jsonb\",\n\t\tself: keys,\n\t\targs: [relation, cfExpr.param(JSON.stringify(names), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n}\n/**\n* Typed check that the relation `name` exists and its `pg_class.relkind` is one of `kinds`, so a view, sequence or index of the same name does not pass as a table.\n*/\nfunction relationKindAst(options) {\n\tconst relation = toRegclass(checkNamespace(options.schema).qualifyTable(options.name));\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"c\", \"oid\").eqExpr(relation), options.kinds.map((kind) => cfExpr.columnRef(\"c\", \"relkind\").eqParam(kind, PG_TEXT_CODEC_ID)).reduce((either, kind) => either.or(kind))]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the constraint `constraintName` on `table` is of kind `contype` (`p`, `u`, `f` or `c`), on the columns `columns` in order when given, and for a foreign key, references `foreignKey`'s table and columns in order with its delete and update actions. It reads only catalog values, never the text Postgres prints for a constraint.\n*/\nfunction constraintDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"c\", \"contype\").eqParam(options.contype, PG_TEXT_CODEC_ID)\n\t];\n\tif (options.columns !== void 0) conditions.push(keyColumnsAre(cfExpr.columnRef(\"c\", \"conkey\"), cfExpr.columnRef(\"c\", \"conrelid\"), options.columns));\n\tconst foreignKey = options.foreignKey;\n\tif (foreignKey !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"confrelid\").eqExpr(toRegclass(checkNamespace(foreignKey.referencedSchema).qualifyTable(foreignKey.referencedTable))), keyColumnsAre(cfExpr.columnRef(\"c\", \"confkey\"), cfExpr.columnRef(\"c\", \"confrelid\"), foreignKey.referencedColumns), cfExpr.columnRef(\"c\", \"confdeltype\").eqParam(foreignKey.onDelete, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"c\", \"confupdtype\").eqParam(foreignKey.onUpdate, PG_TEXT_CODEC_ID));\n\tconst inner = exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that `index` is an index on `table` with the given uniqueness and access method, on the columns `columns` in order, and with or without a predicate. For an index written as an element list (`expression`) it checks no elements: the list can be a real expression, which Postgres stores in `indexprs`, or plain columns with a sort order, operator class or collation, which it stores as columns, and comparing its text would need the form Postgres prints.\n*/\nfunction indexDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst indexColumn = (name) => cfExpr.columnRef(\"i\", name);\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_index\", \"i\"), cfExpr.columnRef(\"i\", \"indexrelid\").eqExpr(cfExpr.columnRef(\"c\", \"oid\"))).join(cfTable(\"pg_am\", \"m\"), cfExpr.columnRef(\"m\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relam\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"c\", \"oid\").eqExpr(toRegclass(namespace.qualifyTable(options.index))),\n\t\tcfExpr.columnRef(\"c\", \"relkind\").eqParam(\"i\", PG_TEXT_CODEC_ID).or(cfExpr.columnRef(\"c\", \"relkind\").eqParam(\"I\", PG_TEXT_CODEC_ID)),\n\t\tindexColumn(\"indrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\toptions.unique ? indexColumn(\"indisunique\") : indexColumn(\"indisunique\").not(),\n\t\tcfExpr.columnRef(\"m\", \"amname\").eqParam(options.method, PG_TEXT_CODEC_ID),\n\t\t...\"columns\" in options.elements ? [indexColumn(\"indexprs\").isNull().and(keyColumnsAre(indexColumn(\"indkey\"), indexColumn(\"indrelid\"), options.elements.columns))] : [],\n\t\toptions.hasPredicate ? indexColumn(\"indpred\").isNotNull() : indexColumn(\"indpred\").isNull()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the RLS policy `policyName` on `table` exists with the command `command` (as `pg_policies.cmd` prints it, such as `ALL` or `SELECT`), the permissive flag, and exactly the roles `roles`, in any order. A role written as `current_user`, `current_role` or `session_user` stands for the role it names in the session that runs the check, as `CREATE POLICY` resolves it. It never compares the policy's expressions.\n*/\nfunction rlsPolicyDefinitionAst(options) {\n\tconst rolesAre = cfExpr.fn({\n\t\tmethod: \"roles_are\",\n\t\ttemplate: `(SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT policy_role::text COLLATE \"C\" AS role_name FROM unnest({{self}}) AS policy_role) AS actual_roles) = (SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT (CASE expected_role WHEN 'current_user' THEN current_user::text WHEN 'current_role' THEN current_role::text WHEN 'session_user' THEN session_user::text ELSE expected_role END) COLLATE \"C\" AS role_name FROM jsonb_array_elements_text(({{arg0}})::jsonb) AS expected_role) AS expected_roles)`,\n\t\tself: cfExpr.identifierRef(\"roles\"),\n\t\targs: [cfExpr.param(JSON.stringify(options.roles), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"cmd\").eqParam(options.command, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"permissive\").eqParam(options.permissive ? \"PERMISSIVE\" : \"RESTRICTIVE\", PG_TEXT_CODEC_ID),\n\t\trolesAre\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the column owns a sequence, whatever its name, of the type `sequenceType` (`smallint`, `integer` or `bigint`). With `orNone`, a column that owns no sequence passes too.\n*/\nfunction columnOwnsSequenceAst(options) {\n\tconst ownedSequence = ownedSequenceOf(options);\n\tconst sequenceType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.sequenceType, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst sequenceOfType = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequence), cfExpr.columnRef(\"s\", \"seqtypid\").eqExpr(sequenceType)]));\n\treturn exprSelect().project(\"result\", options.orNone ? ownedSequence.isNull().or(cfExpr.exists(sequenceOfType)) : ownedSequence.isNotNull().and(cfExpr.exists(sequenceOfType))).build();\n}\n/**\n* Typed column-type check by the type's identity: compares the column's `pg_attribute.atttypid` with `to_regtype(type)`, or with that type's array type for a list. It checks a type that claims a kind, such as an enum, whatever schema it is in, and a type the stack's data types do not read. `to_regtype` drops a type modifier, so `varchar(20)` matches any `varchar`.\n*/\nfunction columnTypeOidAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst expectedType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: options.many ? \"(SELECT \\\"t\\\".\\\"typarray\\\" FROM \\\"pg_catalog\\\".\\\"pg_type\\\" AS \\\"t\\\" WHERE \\\"t\\\".\\\"oid\\\" = to_regtype({{self}}))\" : \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.type, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"a\", \"attrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"atttypid\").eqExpr(expectedType),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the sequence the column owns has handed out no value above `maxValue`, so narrowing it to a smaller integer type keeps every value it already gave. The sequence's position is read only when its current maximum is above `maxValue`, that is when the change narrows it, so widening needs no rights on the sequence. A sequence that has never been read, and a column that owns none, pass.\n*/\nfunction sequenceValuesFitAst(options) {\n\tconst pastMax = cfExpr.fn({\n\t\tmethod: \"sequence_past_max\",\n\t\ttemplate: \"CASE WHEN {{self}} <= ({{arg0}})::bigint THEN false ELSE coalesce(pg_sequence_last_value(\\\"s\\\".\\\"seqrelid\\\"), 0) > ({{arg0}})::bigint END\",\n\t\tself: cfExpr.columnRef(\"s\", \"seqmax\"),\n\t\targs: [cfExpr.param(options.maxValue, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst narrowedPastMax = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequenceOf(options)).and(pastMax));\n\treturn exprSelect().project(\"result\", cfExpr.notExists(narrowedPastMax)).build();\n}\n/** Typed schema existence check over `pg_namespace`, with the schema name bound as a text parameter. */\nfunction schemaExistsAst(schema) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_namespace\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"nspname\").eqParam(schema, PG_TEXT_CODEC_ID));\n\treturn {\n\t\tschemaPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tschemaAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction objectsInSchema(catalog, namespaceColumn, schema, only = []) {\n\treturn exprSelect().from(cfTable(catalog, \"o\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"o\", namespaceColumn))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID), ...only]));\n}\n/**\n* Whether a schema holds no relations (tables, views, sequences, indexes), no types of its own and\n* no functions, so `DROP SCHEMA` without `CASCADE` succeeds. A table's row type and an array type\n* belong to another object and are not counted.\n*/\nfunction schemaHoldsNoObjectsAst(schema) {\n\treturn exprSelect().project(\"result\", cfExpr.allOf([\n\t\tcfExpr.notExists(objectsInSchema(\"pg_class\", \"relnamespace\", schema)),\n\t\tcfExpr.notExists(objectsInSchema(\"pg_type\", \"typnamespace\", schema, [cfExpr.columnRef(\"o\", \"typrelid\").eqLit(0), cfExpr.columnRef(\"o\", \"typelem\").eqLit(0)])),\n\t\tcfExpr.notExists(objectsInSchema(\"pg_proc\", \"pronamespace\", schema))\n\t])).build();\n}\n/**\n* After a table of the unbound namespace moves to `toSchema`: the search path finds no table of that\n* name, or finds only the moved one, which it does when `toSchema` is on the search path.\n*/\nfunction unboundTableMovedAst(table, toSchema) {\n\tconst found = toRegclass(checkNamespace(UNBOUND_NAMESPACE_ID).qualifyTable(table));\n\tconst moved = toRegclass(checkNamespace(toSchema).qualifyTable(table));\n\treturn exprSelect().project(\"result\", found.isNull().or(found.eqExpr(moved))).build();\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build an `ADD CONSTRAINT` action for use inside {@link alterTable}. The renderer writes the constraint as `CREATE TABLE` writes it.\n*/\nfunction addConstraintAction(constraint) {\n\treturn new AddConstraintAction(constraint);\n}\n/**\n* Build an `ALTER COLUMN \"<columnName>\" TYPE <type> USING …` action for use inside {@link alterTable}. `type` is written verbatim; `using` is opaque SQL, and when it is absent or empty the conversion is `\"<columnName>\"::<type>`.\n*/\nfunction alterColumnTypeAction(options) {\n\treturn new AlterColumnTypeAction({\n\t\tcolumnName: options.columnName,\n\t\ttype: options.type,\n\t\tusing: options.using ? opaqueSql(options.using) : void 0\n\t});\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction}, {@link dropDefaultAction}, {@link addConstraintAction} and {@link alterColumnTypeAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … SET SCHEMA` DDL node. Identifiers are quoted by the renderer; an\n* absent `schema` leaves the table unqualified (the unbound namespace).\n*/\nfunction alterTableSetSchema(options) {\n\treturn new PostgresAlterTableSetSchema(options);\n}\n/** Build a Postgres `ALTER SCHEMA … RENAME TO` DDL node. Identifiers are quoted by the renderer. */\nfunction alterSchemaRename(options) {\n\treturn new PostgresAlterSchemaRename(options);\n}\n/** Build a Postgres `DROP SCHEMA` DDL node, without `CASCADE`. The name is quoted by the renderer. */\nfunction dropSchema(options) {\n\treturn new PostgresDropSchema(options);\n}\n//#endregion\nexport { indexDefinitionAst as A, schemaHoldsNoObjectsAst as B, columnNullabilityAst as C, constraintDefinitionAst as D, columnTypeOidAst as E, relationKindAst as F, tablePrimaryKeyAst as G, sequenceValuesFitAst as H, rlsEnabledAst as I, toRegclass as K, rlsPolicyDefinitionAst as L, nativeEnumTypeExistsAst as M, nativeEnumValueExistsAst as N, constraintExistsAst as O, noNullValuesAst as P, rlsPolicyExistsAst as R, columnExistsAst as S, columnTypeAst as T, tableExistsAst as U, sequenceNameAvailableAst as V, tableIsEmptyAst as W, dropPolicy as _, alterPolicyRename as a, columnDefaultAst as b, alterTableSetSchema as c, createSchema as d, createTable as f, dropIndex as g, dropDefaultAction as h, alterIndexRename as i, indexExistsAst as j, extensionExistsAst as k, createIndex as l, disableRowLevelSecurity as m, addConstraintAction as n, alterSchemaRename as o, createType as p, unboundTableMovedAst as q, alterColumnTypeAction as r, alterTable as s, addColumnAction as t, createPolicy as u, dropSchema as v, columnOwnsSequenceAst as w, columnDefaultSequenceAst as x, dropType as y, schemaExistsAst as z };\n\n//# sourceMappingURL=ddl-LpR9foVX.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,WAAW,eAAe;CAClC,OAAO,OAAO,GAAG;EAChB,QAAQ;EACR,UAAU;EACV,MAAM,OAAO,MAAM,eAAe,gBAAgB;EAClD,SAAS;GACR,SAAS;GACT,UAAU;EACX;CACD,CAAC;AACF;;;;;;;;;;AAUA,SAA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