@prisma/orm-target-postgres 8.0.0-rc.17-dev.6 → 8.0.0-rc.17-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__runtime.mjs +1 -1
- package/dist/{authoring-CL05jlfX-CKUKjRVV.mjs → authoring-BsVnEibY-DEWnQRiF.mjs} +62 -55
- package/dist/authoring-BsVnEibY-DEWnQRiF.mjs.map +1 -0
- package/dist/{authoring-CLNoGwgA-DPDmJeBt.d.mts → authoring-DWd5pnnV-g81c_ETF.d.mts} +10 -10
- package/dist/authoring-DWd5pnnV-g81c_ETF.d.mts.map +1 -0
- package/dist/{control-CDAHFmyX.mjs → control-KIoUTWJ_.mjs} +48 -9
- package/dist/control-KIoUTWJ_.mjs.map +1 -0
- package/dist/{descriptor-meta-ClvaJRgh-Dlo6A0nL.mjs → descriptor-meta-DkzkByC8-WIm-Vvrd.mjs} +3 -3
- package/dist/{descriptor-meta-ClvaJRgh-Dlo6A0nL.mjs.map → descriptor-meta-DkzkByC8-WIm-Vvrd.mjs.map} +1 -1
- package/dist/{infer-psl-contract-lnoCopbJ-DRVPVZyI.mjs → infer-psl-contract-D0iF_YRT-DwW3Imk5.mjs} +62 -16
- package/dist/infer-psl-contract-D0iF_YRT-DwW3Imk5.mjs.map +1 -0
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{pack-C3Y2SBNH.d.mts → pack-BOVET-UW.d.mts} +3 -3
- package/dist/{pack-C3Y2SBNH.d.mts.map → pack-BOVET-UW.d.mts.map} +1 -1
- package/dist/{planner-BLGCBKzQ-BFmyE8A2.mjs → planner-an3B45Ri-2-1c8dYN.mjs} +4 -4
- package/dist/{planner-BLGCBKzQ-BFmyE8A2.mjs.map → planner-an3B45Ri-2-1c8dYN.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-8cUeUjsL-DwO8p6_t.mjs → planner-produced-postgres-migration-LNElx7_r-B4yTRRyt.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-8cUeUjsL-DwO8p6_t.mjs.map → planner-produced-postgres-migration-LNElx7_r-B4yTRRyt.mjs.map} +1 -1
- package/dist/{postgres-contract-view-BpZ_4qOD-BuCMIaSB.mjs → postgres-contract-view-BpmiHSDZ-C6ntn6T7.mjs} +3 -3
- package/dist/{postgres-contract-view-BpZ_4qOD-BuCMIaSB.mjs.map → postgres-contract-view-BpmiHSDZ-C6ntn6T7.mjs.map} +1 -1
- package/dist/{postgres-migration-Deb4XrMA-DO7iGvl2.mjs → postgres-migration-BtlvhcXs-UjWm8cAb.mjs} +3 -3
- package/dist/{postgres-migration-Deb4XrMA-DO7iGvl2.mjs.map → postgres-migration-BtlvhcXs-UjWm8cAb.mjs.map} +1 -1
- package/dist/{prisma7-binding-C1fIMMTb.d.mts → prisma7-binding-BQ5VOUjh.d.mts} +3 -3
- package/dist/{prisma7-binding-C1fIMMTb.d.mts.map → prisma7-binding-BQ5VOUjh.d.mts.map} +1 -1
- package/dist/{prisma7-binding-DE7hezAQ.mjs → prisma7-binding-Dq-vT_9_.mjs} +4 -4
- package/dist/{prisma7-binding-DE7hezAQ.mjs.map → prisma7-binding-Dq-vT_9_.mjs.map} +1 -1
- package/dist/target.d.mts +2 -2
- package/dist/target.mjs +7 -7
- package/dist/target__control.mjs +3 -3
- package/dist/target__migration.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.mjs +2 -2
- package/dist/target__runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/authoring-CL05jlfX-CKUKjRVV.mjs.map +0 -1
- package/dist/authoring-CLNoGwgA-DPDmJeBt.d.mts.map +0 -1
- package/dist/control-CDAHFmyX.mjs.map +0 -1
- package/dist/infer-psl-contract-lnoCopbJ-DRVPVZyI.mjs.map +0 -1
package/dist/target.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { A as tableIsEmptyAst, D as rlsPolicyExistsAst, E as rlsEnabledAst, M as
|
|
|
15
15
|
import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free-DjI-gclO.mjs";
|
|
16
16
|
import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-BUygtI9N-CB-uwvY1.mjs";
|
|
17
17
|
import { n as computeContentHash, t as POLICY_OPERATION_PREDICATES } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
|
|
18
|
-
import { a as instantNowControlDescriptor, i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
18
|
+
import { a as instantNowControlDescriptor, i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-BsVnEibY-DEWnQRiF.mjs";
|
|
19
19
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-BaFrBceq-ChgvazEN.mjs";
|
|
20
20
|
import { t as postgresDataTypeEntries } from "./data-type-entries-DoR61yeO-BB2cY7rI.mjs";
|
|
21
21
|
import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
@@ -30,18 +30,18 @@ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./pla
|
|
|
30
30
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs";
|
|
31
31
|
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-DbDoLxrp-OpWBtviT.mjs";
|
|
32
32
|
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-CByLrBg6-BLLJDUpg.mjs";
|
|
33
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
33
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-BpmiHSDZ-C6ntn6T7.mjs";
|
|
34
34
|
import { t as dataTransform } from "./data-transform-Bo32KRbq-BLn1_UG-.mjs";
|
|
35
|
-
import { s as postgresRenderDefault, t as PostgresMigration } from "./postgres-migration-
|
|
35
|
+
import { s as postgresRenderDefault, t as PostgresMigration } from "./postgres-migration-BtlvhcXs-UjWm8cAb.mjs";
|
|
36
36
|
import { t as renderOps } from "./render-ops-DjsYroU7-Nqqlj8co.mjs";
|
|
37
37
|
import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
|
|
38
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
39
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
38
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-LNElx7_r-B4yTRRyt.mjs";
|
|
39
|
+
import { t as createPostgresMigrationPlanner } from "./planner-an3B45Ri-2-1c8dYN.mjs";
|
|
40
40
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
|
|
41
|
-
import { n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-
|
|
41
|
+
import { n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-KIoUTWJ_.mjs";
|
|
42
42
|
import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DHtcrdrH-DpbFRMEu.mjs";
|
|
43
43
|
import { t as tsquery } from "./full-text-DyeP0p9V.mjs";
|
|
44
44
|
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
|
|
45
45
|
import { n as normalizeSchemaNativeType, t as introspectedNativeType } from "./native-type-normalizer-CwyVR7xB.mjs";
|
|
46
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
46
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-Dq-vT_9_.mjs";
|
|
47
47
|
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, FullTextDocument, INSTANT_NOW_GENERATOR_ID, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, POLICY_OPERATION_PREDICATES, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, alterTable, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, introspectedNativeType, isPgEnumParams, isPostgresCodecDescriptor, isPostgresDateTimeDataType, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateCanonical, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgNumeric, pgNumericColumn, pgNumericParams, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeCanonical, pgTimestamp, pgTimestampCanonical, pgTimestamptz, pgTimestamptzCanonical, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetz, pgTimetzCanonical, pgTimetzColumn, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, phrasetoTsquery, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, plaintoTsquery, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresDateTimeDdlText, postgresError, postgresNativeAuthoringTypes, postgresPslTypeConstructors, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, postgresScalarAuthoringTypes, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
2
|
-
import { a as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
3
|
-
import { s as postgresRenderDefault } from "./postgres-migration-
|
|
4
|
-
import { i as postgresTargetDescriptor, n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-
|
|
2
|
+
import { a as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, s as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-BsVnEibY-DEWnQRiF.mjs";
|
|
3
|
+
import { s as postgresRenderDefault } from "./postgres-migration-BtlvhcXs-UjWm8cAb.mjs";
|
|
4
|
+
import { i as postgresTargetDescriptor, n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-KIoUTWJ_.mjs";
|
|
5
5
|
export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresNativeAuthoringTypes, postgresPslTypeConstructors, postgresRenderDefault, postgresScalarAuthoringTypes };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { R as createExtension } from "./op-factory-call-BfGiIbUO-BqaxwJhg.mjs";
|
|
2
2
|
import { t as dataTransform } from "./data-transform-Bo32KRbq-BLn1_UG-.mjs";
|
|
3
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
3
|
+
import { t as PostgresMigration } from "./postgres-migration-BtlvhcXs-UjWm8cAb.mjs";
|
|
4
4
|
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
|
|
5
5
|
export { PostgresMigration as Migration, MigrationCLI, checkExpression, col, createExtension, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };
|
package/dist/target__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresTargetDescriptorMeta } from "./pack-
|
|
1
|
+
import { t as postgresTargetDescriptorMeta } from "./pack-BOVET-UW.mjs";
|
|
2
2
|
export { postgresTargetDescriptorMeta as default };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DkzkByC8-WIm-Vvrd.mjs";
|
|
2
2
|
export { postgresTargetDescriptorMeta as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
1
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-LNElx7_r-B4yTRRyt.mjs";
|
|
2
2
|
export { TypeScriptRenderablePostgresMigration };
|
package/dist/target__planner.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-CByLrBg6-BLLJDUpg.mjs";
|
|
2
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
2
|
+
import { t as createPostgresMigrationPlanner } from "./planner-an3B45Ri-2-1c8dYN.mjs";
|
|
3
3
|
export { contractToPostgresDatabaseSchemaNode, createPostgresMigrationPlanner };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
1
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-BQ5VOUjh.mjs";
|
|
2
2
|
export { prisma7PostgresBinding };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
1
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-Dq-vT_9_.mjs";
|
|
2
2
|
export { prisma7PostgresBinding };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_I
|
|
|
2
2
|
import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
3
3
|
import { t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
4
4
|
import { c as fullTextIndexOptions } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
|
|
5
|
-
import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
5
|
+
import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-BsVnEibY-DEWnQRiF.mjs";
|
|
6
6
|
import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-iArZEoCE-GhLNDdg-.mjs";
|
|
7
7
|
import { t as renderFullTextDocument } from "./full-text-search-document-DJd-9K-K-CuV_QLH3.mjs";
|
|
8
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
8
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-BpmiHSDZ-C6ntn6T7.mjs";
|
|
9
9
|
import { a as normalizationLiteral, c as toTsquery, i as languageLiteral, l as websearchToTsquery, o as phrasetoTsquery, r as headlineOptionsLiteral, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DHtcrdrH-DpbFRMEu.mjs";
|
|
10
10
|
import { type } from "arktype";
|
|
11
11
|
import { assertDefined } from "@prisma/orm-framework/utils/assertions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { a as fullTextIndexOptions } from \"./full-text-index-definition-D-QC3DO2.mjs\";\nimport { f as INSTANT_NOW_GENERATOR_ID, l as PLAIN_DATE_TIME_NOW_GENERATOR_ID, p as instantNow, u as plainDateTimeNow } from \"./authoring-CL05jlfX.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-iArZEoCE.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-DJd-9K-K.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-BpZ_4qOD.mjs\";\nimport { a as headlineOptionsLiteral, c as FullTextDocument, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-DHtcrdrH.mjs\";\nimport { type } from \"arktype\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction isIndexReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && !isExpression(value) && \"type\" in value && \"options\" in value && \"columns\" in value;\n}\nfunction invalidDocument(method, argument, received, message, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${message}`, {\n\t\twhy: \"Postgres uses a full-text index only for a query over the same search document, so the document comes from the index itself, from one column, or from `fullTextDocument`.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\n/**\n* The weight groups and the language a search document stands for. A full-text index states both;\n* a column and a `fullTextDocument` take the language from the options.\n*/\nfunction documentGroups(method, document, options) {\n\tif (document instanceof FullTextDocument) return {\n\t\tweightGroups: document.weightGroups,\n\t\tlanguage: languageOf(options)\n\t};\n\tif (isExpression(document)) return {\n\t\tweightGroups: [[document]],\n\t\tlanguage: languageOf(options)\n\t};\n\tif (!isIndexReference(document)) throw invalidDocument(method, \"document\", Array.isArray(document) ? \"array\" : typeof document, \"the document must be a full-text index from a table's `indexes`, a column, or a document from `fullTextDocument`.\", \"Pass the index, as `table.indexes.<name>`, or wrap the weight groups in `fullTextDocument(...)`.\");\n\tif (document.type !== \"fullText\") throw invalidDocument(method, \"document\", document.type, `the index is of type \"${String(document.type)}\", not a full-text index.`, \"Pass an index declared with `@@fullTextIndex` or `fullTextIndex`.\");\n\tif (options.language !== void 0) throw invalidDocument(method, \"options\", options.language, \"a full-text index states its language, so the `language` option is not taken with one.\", \"Leave `language` out; the index decides it.\");\n\tconst definition = fullTextIndexOptions(document.options ?? {});\n\tif (definition instanceof type.errors) throw invalidDocument(method, \"document\", document.options, `the full-text index has invalid options: ${definition.summary}`, \"Pass the index as the table gives it.\");\n\tconst columns = document.columns;\n\tconst columnOf = (name) => {\n\t\tconst column = typeof columns === \"object\" && columns !== null && Object.hasOwn(columns, name) ? Reflect.get(columns, name) : void 0;\n\t\tif (!isExpression(column)) throw invalidDocument(method, \"document\", name, `the full-text index has no column \"${name}\", which its weight groups name.`, \"Pass the index as the table gives it.\");\n\t\treturn column;\n\t};\n\treturn {\n\t\tweightGroups: definition.weightGroups.map((group) => group.map(columnOf)),\n\t\tlanguage: definition.language\n\t};\n}\n/**\n* The search document an operation searches. The first column is the operation's `self`; the\n* others follow the `fixedArgs` the operation passes first, so the query, the language and any\n* further option keep their positions.\n*/\nfunction searchDocument(method, document, options, fixedArgs) {\n\tconst { weightGroups, language } = documentGroups(method, document, options);\n\tlet position = 0;\n\tconst template = renderFullTextDocument(weightGroups.map((group) => group.map(() => position++)), {\n\t\tcolumn: (index) => index === 0 ? \"{{self}}\" : `{{arg${fixedArgs + index - 1}}}`,\n\t\tlanguage: \"{{arg1}}\"\n\t});\n\tconst [self, ...rest] = weightGroups.flat().map((column) => toExpr(column));\n\tassertDefined(self, `${method}: a checked document has a first column`);\n\treturn {\n\t\tself,\n\t\trest,\n\t\ttemplate,\n\t\tlanguage: languageLiteral(method, language)\n\t};\n}\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst searched = searchDocument(\"fullTextMatches\", document, options, 2);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tsearched.language,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${searched.template} @@ {{arg0}}`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst searched = searchDocument(\"fullTextRank\", document, options, normalization === void 0 ? 2 : 3);\n\t\t\t\tconst fixed = normalization === void 0 ? [searched.language] : [searched.language, normalization];\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\t...fixed,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${searched.template}, {{arg0}}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,EAAE,SAAS,oBAAoB;AACnD,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK,KAAK,CAAC,aAAa,KAAK,KAAK,UAAU,SAAS,aAAa,SAAS,aAAa;AAC9J;AACA,SAAS,gBAAgB,QAAQ,UAAU,UAAU,SAAS,KAAK;CAClE,OAAO,cAAc,4B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GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
|
1
|
+
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { a as fullTextIndexOptions } from \"./full-text-index-definition-D-QC3DO2.mjs\";\nimport { f as INSTANT_NOW_GENERATOR_ID, l as PLAIN_DATE_TIME_NOW_GENERATOR_ID, p as instantNow, u as plainDateTimeNow } from \"./authoring-BsVnEibY.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-iArZEoCE.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-DJd-9K-K.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-BpmiHSDZ.mjs\";\nimport { a as headlineOptionsLiteral, c as FullTextDocument, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-DHtcrdrH.mjs\";\nimport { type } from \"arktype\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction isIndexReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && !isExpression(value) && \"type\" in value && \"options\" in value && \"columns\" in value;\n}\nfunction invalidDocument(method, argument, received, message, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${message}`, {\n\t\twhy: \"Postgres uses a full-text index only for a query over the same search document, so the document comes from the index itself, from one column, or from `fullTextDocument`.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\n/**\n* The weight groups and the language a search document stands for. A full-text index states both;\n* a column and a `fullTextDocument` take the language from the options.\n*/\nfunction documentGroups(method, document, options) {\n\tif (document instanceof FullTextDocument) return {\n\t\tweightGroups: document.weightGroups,\n\t\tlanguage: languageOf(options)\n\t};\n\tif (isExpression(document)) return {\n\t\tweightGroups: [[document]],\n\t\tlanguage: languageOf(options)\n\t};\n\tif (!isIndexReference(document)) throw invalidDocument(method, \"document\", Array.isArray(document) ? \"array\" : typeof document, \"the document must be a full-text index from a table's `indexes`, a column, or a document from `fullTextDocument`.\", \"Pass the index, as `table.indexes.<name>`, or wrap the weight groups in `fullTextDocument(...)`.\");\n\tif (document.type !== \"fullText\") throw invalidDocument(method, \"document\", document.type, `the index is of type \"${String(document.type)}\", not a full-text index.`, \"Pass an index declared with `@@fullTextIndex` or `fullTextIndex`.\");\n\tif (options.language !== void 0) throw invalidDocument(method, \"options\", options.language, \"a full-text index states its language, so the `language` option is not taken with one.\", \"Leave `language` out; the index decides it.\");\n\tconst definition = fullTextIndexOptions(document.options ?? {});\n\tif (definition instanceof type.errors) throw invalidDocument(method, \"document\", document.options, `the full-text index has invalid options: ${definition.summary}`, \"Pass the index as the table gives it.\");\n\tconst columns = document.columns;\n\tconst columnOf = (name) => {\n\t\tconst column = typeof columns === \"object\" && columns !== null && Object.hasOwn(columns, name) ? Reflect.get(columns, name) : void 0;\n\t\tif (!isExpression(column)) throw invalidDocument(method, \"document\", name, `the full-text index has no column \"${name}\", which its weight groups name.`, \"Pass the index as the table gives it.\");\n\t\treturn column;\n\t};\n\treturn {\n\t\tweightGroups: definition.weightGroups.map((group) => group.map(columnOf)),\n\t\tlanguage: definition.language\n\t};\n}\n/**\n* The search document an operation searches. The first column is the operation's `self`; the\n* others follow the `fixedArgs` the operation passes first, so the query, the language and any\n* further option keep their positions.\n*/\nfunction searchDocument(method, document, options, fixedArgs) {\n\tconst { weightGroups, language } = documentGroups(method, document, options);\n\tlet position = 0;\n\tconst template = renderFullTextDocument(weightGroups.map((group) => group.map(() => position++)), {\n\t\tcolumn: (index) => index === 0 ? \"{{self}}\" : `{{arg${fixedArgs + index - 1}}}`,\n\t\tlanguage: \"{{arg1}}\"\n\t});\n\tconst [self, ...rest] = weightGroups.flat().map((column) => toExpr(column));\n\tassertDefined(self, `${method}: a checked document has a first column`);\n\treturn {\n\t\tself,\n\t\trest,\n\t\ttemplate,\n\t\tlanguage: languageLiteral(method, language)\n\t};\n}\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst searched = searchDocument(\"fullTextMatches\", document, options, 2);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tsearched.language,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${searched.template} @@ {{arg0}}`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst searched = searchDocument(\"fullTextRank\", document, options, normalization === void 0 ? 2 : 3);\n\t\t\t\tconst fixed = normalization === void 0 ? [searched.language] : [searched.language, normalization];\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\t...fixed,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${searched.template}, {{arg0}}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,EAAE,SAAS,oBAAoB;AACnD,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK,KAAK,CAAC,aAAa,KAAK,KAAK,UAAU,SAAS,aAAa,SAAS,aAAa;AAC9J;AACA,SAAS,gBAAgB,QAAQ,UAAU,UAAU,SAAS,KAAK;CAClE,OAAO,cAAc,4BAA4B,GAAG,OAAO,IAAI,WAAW;EACzE,KAAK;EACL;EACA,MAAM;GACL,QAAQ;GACR;GACA;EACD;CACD,CAAC;AACF;;;;;AAKA,SAAS,eAAe,QAAQ,UAAU,SAAS;CAClD,IAAI,oBAAoB,kBAAkB,OAAO;EAChD,cAAc,SAAS;EACvB,UAAU,WAAW,OAAO;CAC7B;CACA,IAAI,aAAa,QAAQ,GAAG,OAAO;EAClC,cAAc,CAAC,CAAC,QAAQ,CAAC;EACzB,UAAU,WAAW,OAAO;CAC7B;CACA,IAAI,CAAC,iBAAiB,QAAQ,GAAG,MAAM,gBAAgB,QAAQ,YAAY,MAAM,QAAQ,QAAQ,IAAI,UAAU,OAAO,UAAU,qHAAqH,kGAAkG;CACvV,IAAI,SAAS,SAAS,YAAY,MAAM,gBAAgB,QAAQ,YAAY,SAAS,MAAM,yBAAyB,OAAO,SAAS,IAAI,EAAE,4BAA4B,mEAAmE;CACzO,IAAI,QAAQ,aAAa,KAAK,GAAG,MAAM,gBAAgB,QAAQ,WAAW,QAAQ,UAAU,0FAA0F,6CAA6C;CACnO,MAAM,aAAa,qBAAqB,SAAS,WAAW,CAA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E,MAAM,OAAO;IACb,OAAO,eAAe;KACrB,QAAQ;KACR,MAAM;MACL,OAAO,IAAI;MACX,OAAO,OAAO,WAAW;MACzB,gBAAgB,oBAAoB,WAAW,OAAO,CAAC;MACvD,GAAG,oBAAoB,KAAK,IAAI,CAAC,IAAI,CAAC,eAAe;KACtD;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU,GAAG,OAAO,oBAAoB,KAAK,IAAI,KAAK,aAAa;KACpE;IACD,CAAC;GACF;EACD;EACA,oBAAoB,EAAE,MAAM,mBAAmB;EAC/C,WAAW,EAAE,MAAM,UAAU;EAC7B,gBAAgB,EAAE,MAAM,eAAe;EACvC,iBAAiB,EAAE,MAAM,gBAAgB;CAC1C;AACD;;;;;;;AASA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-postgres",
|
|
3
|
-
"version": "8.0.0-rc.17-dev.
|
|
3
|
+
"version": "8.0.0-rc.17-dev.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "8.0.0-rc.17-dev.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.17-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.17-dev.
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.17-dev.7",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.17-dev.7",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.17-dev.7",
|
|
15
15
|
"@standard-schema/spec": "^1.1.0",
|
|
16
16
|
"@types/node": "26.1.2",
|
|
17
17
|
"@types/pg": "8.20.4",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"postgres-array": "2.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@internal/adapter-postgres": "8.0.0-rc.17-dev.
|
|
26
|
-
"@internal/driver-postgres": "8.0.0-rc.17-dev.
|
|
27
|
-
"@internal/target-postgres": "8.0.0-rc.17-dev.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.17-dev.
|
|
29
|
-
"@repo/tsdown": "8.0.0-rc.17-dev.
|
|
25
|
+
"@internal/adapter-postgres": "8.0.0-rc.17-dev.7",
|
|
26
|
+
"@internal/driver-postgres": "8.0.0-rc.17-dev.7",
|
|
27
|
+
"@internal/target-postgres": "8.0.0-rc.17-dev.7",
|
|
28
|
+
"@repo/tsconfig": "8.0.0-rc.17-dev.7",
|
|
29
|
+
"@repo/tsdown": "8.0.0-rc.17-dev.7",
|
|
30
30
|
"tsdown": "0.22.14",
|
|
31
31
|
"typescript": "5.9.3",
|
|
32
32
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-CL05jlfX-CKUKjRVV.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/authoring-CL05jlfX.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, s as PG_ENUM_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { j as requireTemporal } from \"./codecs-BK3J4C0n.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { f as weightGroupsOf, l as POSTGRES_TEXT_SEARCH_LANGUAGES, o as fullTextIndexProblems, r as describeFullTextIndexProblem, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-D-QC3DO2.mjs\";\nimport { t as postgresCodecTraitsOf } from \"./postgres-codec-traits-BUygtI9N.mjs\";\nimport { _ as PostgresRlsPolicy, d as PostgresNativeEnumSchema, f as PostgresRlsEnablementSchema, h as PostgresRole, m as PostgresRoleSchema, p as PostgresRlsPolicySchema, v as PostgresRlsEnablement } from \"./postgres-schema-DIaAgaL6.mjs\";\nimport { n as computeContentHash } from \"./canonicalize-CrN3u_xM.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { temporalCodecPresetWithPrecision, temporalStringAuthoringPresets } from \"@internal/family-sql/control\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalAuthoringPresets } from \"@internal/framework-components/authoring\";\nimport { blockAttribute, bool, entityRef, fieldRef, identifier, leafDiagnostic, list, mapBlock, modelAttribute, oneOf, optional, str, structBlock } from \"@internal/psl-parser\";\nimport { exactNameBodyWarning } from \"@internal/sql-contract/index-naming\";\nimport { assertWireNamePrefixLength, normalizeSqlBody } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/core/instant-now-generator.ts\nconst INSTANT_NOW_GENERATOR_ID = \"instantNow\";\nfunction instantNowControlDescriptor() {\n\treturn {\n\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: INSTANT_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: INSTANT_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\nfunction instantNow() {\n\treturn requireTemporal({ generatorId: INSTANT_NOW_GENERATOR_ID }).Now.instant();\n}\n//#endregion\n//#region src/core/plain-date-time-now-generator.ts\n/**\n* The \"now\" generator for `timestamp` (without time zone) columns: the current\n* moment as a UTC wall-clock `Temporal.PlainDateTime`, the representation\n* `pg/timestamp-temporal@1` encodes. `timestamptz` columns use `instantNow`.\n*/\nconst PLAIN_DATE_TIME_NOW_GENERATOR_ID = \"plainDateTimeNow\";\nfunction plainDateTimeNowControlDescriptor() {\n\treturn {\n\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\nfunction plainDateTimeNow() {\n\treturn requireTemporal({ generatorId: PLAIN_DATE_TIME_NOW_GENERATOR_ID }).Now.plainDateTimeISO(\"UTC\");\n}\n//#endregion\n//#region src/core/now-generators.ts\n/** The \"now\" generator for each codec that has one. The `temporal` field presets read it. */\nconst postgresNowGeneratorIds = {\n\t[PG_TIMESTAMP_TEMPORAL_CODEC_ID]: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMPTZ_DATE_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMP_STRING_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMPTZ_STRING_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID\n};\nconst nowGeneratorIdByCodecId = new Map(Object.entries(postgresNowGeneratorIds));\nfunction postgresNowGeneratorIdFor(codecId) {\n\treturn nowGeneratorIdByCodecId.get(codecId);\n}\n//#endregion\n//#region src/core/authoring.ts\nconst PSL_POLICY_INVALID_MAP = \"PSL_POLICY_INVALID_MAP\";\nconst PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS = \"PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS\";\nconst PSL_FULL_TEXT_INDEX_EMPTY_GROUP = \"PSL_FULL_TEXT_INDEX_EMPTY_GROUP\";\nconst PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD = \"PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD\";\nconst PSL_FULL_TEXT_INDEX_REQUIRES_NAME = \"PSL_FULL_TEXT_INDEX_REQUIRES_NAME\";\nconst PSL_FULL_TEXT_INDEX_NAME_XOR_MAP = \"PSL_FULL_TEXT_INDEX_NAME_XOR_MAP\";\nconst PSL_FULL_TEXT_INDEX_TEXT_FIELD = \"PSL_FULL_TEXT_INDEX_TEXT_FIELD\";\nconst PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE = \"PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE\";\nconst PSL_NATIVE_ENUM_MISSING_MEMBERS = \"PSL_NATIVE_ENUM_MISSING_MEMBERS\";\nconst PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE = \"PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE\";\n/**\n* `pg.enum(<ref>)` registers as an ordinary type constructor whose sole\n* positional argument names a `native_enum` entity instead of carrying a\n* literal value. The interpreter resolves the ref to the `native_enum`\n* entity generically (driven by `entityRefArg`); the `pg/enum@1` codec\n* descriptor's `columnFromEntity` hook (see `codecs.ts`) converts that\n* entity into the column's `typeParams`. The column's type name comes from the\n* `pg/enum` data type, which renders `typeParams.typeName`.\n*/\nconst postgresAuthoringTypes = {\n\tBigIntNumber: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A PostgreSQL 64-bit integer represented as a JavaScript number within its safe integer range.\",\n\t\toutput: { codecId: \"pg/int8number@1\" }\n\t},\n\tUnboundedInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An arbitrary-precision integer stored as PostgreSQL numeric and represented as bigint.\",\n\t\toutput: { codecId: \"pg/unboundedint@1\" }\n\t},\n\tpg: { enum: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tentityRefArg: {\n\t\t\tindex: 0,\n\t\t\tentityKind: \"native_enum\"\n\t\t},\n\t\toutput: { codecId: PG_ENUM_CODEC_ID }\n\t} }\n};\nconst policyTargetParam = {\n\ttype: entityRef({ kind: \"model\" }),\n\tdocumentation: \"The model protected by this policy; it must declare @@rls.\"\n};\nconst policyRolesParam = {\n\ttype: optional(list(oneOf(entityRef({\n\t\tkind: \"block\",\n\t\tkeyword: \"role\"\n\t}), identifier()))),\n\tdocumentation: \"The database roles to which this policy applies.\"\n};\nconst policyUsingParam = {\n\ttype: optional(str()),\n\tdocumentation: \"A SQL predicate controlling which rows this policy permits.\"\n};\nconst policyWithCheckParam = {\n\ttype: optional(str()),\n\tdocumentation: \"A SQL predicate checking rows being written by this policy.\"\n};\nconst policyPermissiveParam = {\n\ttype: optional(bool()),\n\tdocumentation: \"Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).\"\n};\nfunction policyUsingOnlySpec() {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam,\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyWithCheckOnlySpec() {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\twithCheck: policyWithCheckParam,\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyBothPredicatesSpec() {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam,\n\t\twithCheck: policyWithCheckParam,\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction roleSpec() {\n\treturn structBlock({ parameters: {} });\n}\nfunction nativeEnumSpec() {\n\treturn mapBlock({ value: {\n\t\ttype: str(),\n\t\tdocumentation: \"The member value stored in the database enum type.\"\n\t} });\n}\n/**\n* The block keyword that authors each row-level security operation. The keyword is the operation, so\n* a policy block has no `operation` parameter. The reader looks a block's operation up here, and\n* `contract infer` and `contract print` look up the keyword to write.\n*/\nconst POLICY_BLOCK_KEYWORDS = {\n\tselect: \"policy_select\",\n\tinsert: \"policy_insert\",\n\tupdate: \"policy_update\",\n\tdelete: \"policy_delete\",\n\tall: \"policy_all\"\n};\nfunction isRlsPolicyOperation(value) {\n\treturn Object.hasOwn(POLICY_BLOCK_KEYWORDS, value);\n}\n/** The operation a `policy_<operation>` block keyword authors, or `undefined` for another keyword. */\nfunction policyOperationOfKeyword(keyword) {\n\treturn Object.keys(POLICY_BLOCK_KEYWORDS).filter(isRlsPolicyOperation).find((operation) => POLICY_BLOCK_KEYWORDS[operation] === keyword);\n}\n/**\n* Assembles a {@link PostgresRlsPolicy} from lowered inputs: normalizes the\n* predicates, computes the content-hash wire name, and constructs the frozen\n* entity. The single hash-assembly body shared by the PSL block lowering\n* ({@link lowerRlsPolicyFromBlock}) and the TS entity-handle lowering\n* ({@link postgresLowerEntityHandles}) so the two surfaces cannot drift.\n*/\nfunction buildRlsPolicyEntity(input) {\n\tconst permissive = input.permissive ?? true;\n\tconst wireHash = computeContentHash({\n\t\t...ifDefined(\"using\", input.using !== void 0 ? normalizeSqlBody(input.using) : void 0),\n\t\t...ifDefined(\"withCheck\", input.withCheck !== void 0 ? normalizeSqlBody(input.withCheck) : void 0),\n\t\troles: input.roles,\n\t\toperation: input.operation,\n\t\tpermissive\n\t});\n\treturn new PostgresRlsPolicy({\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix: input.prefix,\n\t\t\thash: wireHash\n\t\t},\n\t\ttableName: input.tableName,\n\t\tnamespaceId: input.namespaceId,\n\t\toperation: input.operation,\n\t\troles: input.roles,\n\t\tusing: input.using,\n\t\twithCheck: input.withCheck,\n\t\tpermissive\n\t});\n}\nfunction lowerRlsPolicyFromBlock(block, ctx) {\n\tconst prefix = block.name;\n\tconst operation = policyOperationOfKeyword(block.keyword) ?? \"select\";\n\tconst target = block.resolvedModelRefs?.[\"target\"];\n\tassertDefined(target, `lowerRlsPolicyFromBlock: policy \"${block.name}\" reached the factory without a projected \\`target\\` coordinate; the interpreter projects checked model references before invoking entity factories.`);\n\tconst roles = block.values.roles === void 0 ? [] : block.values.roles.map((role) => typeof role === \"string\" ? role : role.declaration.name).sort();\n\tconst using = block.values.using;\n\tconst withCheck = block.values.withCheck;\n\tconst permissive = block.values.permissive ?? true;\n\tconst mapAttr = block.attributes[\"map\"];\n\tif (mapAttr !== void 0) {\n\t\tconst exactName = mapAttr.args[\"name\"];\n\t\tinvariant(typeof exactName === \"string\", \"@@map on a policy block parses one string argument\");\n\t\tctx.warnings?.push(exactNameBodyWarning(\"policy\", exactName));\n\t\treturn new PostgresRlsPolicy({\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: exactName\n\t\t\t},\n\t\t\ttableName: target.tableName,\n\t\t\tnamespaceId: target.namespaceId,\n\t\t\toperation,\n\t\t\troles,\n\t\t\tusing,\n\t\t\twithCheck,\n\t\t\tpermissive\n\t\t});\n\t}\n\treturn buildRlsPolicyEntity({\n\t\tprefix,\n\t\ttableName: target.tableName,\n\t\tnamespaceId: target.namespaceId,\n\t\toperation,\n\t\troles,\n\t\t...ifDefined(\"using\", using),\n\t\t...ifDefined(\"withCheck\", withCheck),\n\t\tpermissive\n\t});\n}\nconst policyEntityTypeOutput = {\n\tfactory: lowerRlsPolicyFromBlock,\n\tpslPlacement: (entity) => ({ namespaceId: entity.namespaceId })\n};\nfunction lowerNativeEnumFromBlock(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst mapAttr = block.attributes[\"map\"];\n\tlet typeName = block.name;\n\tif (mapAttr !== void 0) {\n\t\tconst mapped = mapAttr.args[\"name\"];\n\t\tinvariant(typeof mapped === \"string\", \"@@map on a native_enum block parses one string argument\");\n\t\ttypeName = mapped;\n\t}\n\tlet memberError = false;\n\tconst seenValues = /* @__PURE__ */ new Set();\n\tconst members = [];\n\tfor (const [memberName, value] of Object.entries(block.values)) {\n\t\tif (seenValues.has(value)) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\": duplicate member value \"${value}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.parameterSpans[memberName] ?? block.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tseenValues.add(value);\n\t\tmembers.push(value);\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: PSL_NATIVE_ENUM_MISSING_MEMBERS,\n\t\t\tmessage: `native_enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresNativeEnum({\n\t\ttypeName,\n\t\tmembers\n\t});\n}\n/**\n* `native_enum`'s entity-type factory output, checked separately from the assembled\n* `postgresAuthoringEntityTypes` map below: `deriveValueSet` is SQL-family surface\n* ({@link SqlValueSetDerivingEntityTypeOutput}), not part of the framework\n* `AuthoringEntityTypeFactoryOutput` shape, so folding it directly into the map's single\n* `satisfies AuthoringEntityTypeNamespace` check would trip an excess-property error. Checking it\n* here against the intersection of both shapes keeps it structurally valid against each without\n* widening the map's own check.\n*/\nconst nativeEnumEntityTypeOutput = {\n\tfactory: lowerNativeEnumFromBlock,\n\tderiveValueSet: (entity) => ({\n\t\tkind: \"valueSet\",\n\t\tvalues: [...entity.members]\n\t})\n};\n/**\n* Lowers a `role <name> {}` block into a {@link PostgresRole}. Roles are\n* cluster-scoped in Postgres, so the block must be declared inside\n* `namespace unbound { … }` — any other lexical namespace (a named schema,\n* or the default bucket top-level declarations resolve to) is a load-time\n* diagnostic. The lowered entity carries the unbound coordinate.\n*/\nfunction lowerRoleFromBlock(block, ctx) {\n\tif (block.namespaceId !== UNBOUND_NAMESPACE_ID) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE,\n\t\t\tmessage: `\\`role\\` block \"${block.name}\" must be declared inside \\`namespace unbound { }\\`, not in namespace \"${block.namespaceId}\"`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresRole({\n\t\tname: block.name,\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t});\n}\nconst postgresAuthoringEntityTypes = {\n\trole: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"role\",\n\t\tvalidatorSchema: PostgresRoleSchema,\n\t\toutput: { factory: lowerRoleFromBlock }\n\t},\n\trls: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"rls\",\n\t\tvalidatorSchema: PostgresRlsEnablementSchema,\n\t\toutput: { factory: (input) => new PostgresRlsEnablement(input) }\n\t},\n\tpolicy: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"policy\",\n\t\tvalidatorSchema: PostgresRlsPolicySchema,\n\t\toutput: policyEntityTypeOutput\n\t},\n\tnative_enum: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"native_enum\",\n\t\tvalidatorSchema: PostgresNativeEnumSchema,\n\t\toutput: nativeEnumEntityTypeOutput\n\t}\n};\n/**\n* Field presets contributed by the Postgres target pack.\n*\n* These mirror the PSL scalar-to-codec mapping used by the Postgres adapter\n* (see `createPostgresPslScalarTypeDescriptors`), so that authoring a field\n* via the TS callback surface (e.g. `field.int()`) and via the PSL scalar\n* surface (e.g. `Int`) lowers to byte-identical contracts.\n*\n* The `uuidNative` / `id.uuidv4Native` / `id.uuidv7Native` presets use the\n* native Postgres `uuid` type (codecId `pg/uuid@1`). For cross-target\n* portability use `uuidString` / `id.uuidv4String` / `id.uuidv7String` from\n* the family pack instead.\n*/\nconst policyRequiresRls = {\n\tparameter: \"target\",\n\tattribute: \"rls\"\n};\nconst policyMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this row-level security policy to its PostgreSQL policy name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The nonempty PostgreSQL policy name.\"\n\t}],\n\trefine: (parsed, ctx, attributeNode) => parsed.name === \"\" ? [leafDiagnostic(ctx, attributeNode, \"@@map policy name must be a non-empty string\", PSL_POLICY_INVALID_MAP)] : []\n});\nconst policyBlockAttributes = { map: () => policyMapAttribute };\nconst nativeEnumMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this native enum to its PostgreSQL type name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The PostgreSQL enum type name.\"\n\t}]\n});\nconst postgresAuthoringPslBlockDescriptors = {\n\t[POLICY_BLOCK_KEYWORDS.select]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.select,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be selected.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.delete]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.delete,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be deleted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.insert]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.insert,\n\t\tdocumentation: \"Defines a row-level security policy checking rows being inserted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyWithCheckOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.update]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.update,\n\t\tdocumentation: \"Defines a row-level security policy controlling row visibility and checks for updates.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.all]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.all,\n\t\tdocumentation: \"Defines a row-level security policy applying to all operations.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\tnative_enum: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"native_enum\",\n\t\tdocumentation: \"Defines a PostgreSQL enum type with named string-valued members.\",\n\t\tdiscriminator: \"native_enum\",\n\t\tname: { required: true },\n\t\tspec: nativeEnumSpec,\n\t\tnameIsStorageName: true,\n\t\tattributes: { map: () => nativeEnumMapAttribute }\n\t},\n\t/**\n\t* PSL block descriptor for `role` (e.g. `role anon {}`). Name-only, no\n\t* parameters and no body content. Declared inside `namespace unbound { }`\n\t* — see {@link lowerRoleFromBlock} for the placement check and the\n\t* coordinate the lowered entity carries.\n\t*/\n\trole: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"role\",\n\t\tdocumentation: \"Declares an existing database role in namespace unbound for use in security policies.\",\n\t\tdiscriminator: \"role\",\n\t\tname: { required: true },\n\t\tspec: roleSpec\n\t}\n};\nconst postgresRlsSpec = modelAttribute(\"rls\", { documentation: \"Enables PostgreSQL row-level security on this model’s table.\" });\nconst postgresRlsSpecFactory = () => postgresRlsSpec;\nconst [firstLanguage, ...remainingLanguages] = POSTGRES_TEXT_SEARCH_LANGUAGES;\nconst fullTextField = fieldRef();\nconst postgresFullTextIndexSpec = modelAttribute(\"fullTextIndex\", {\n\tdocumentation: \"Indexes text fields for full-text search. Each item of the list is a weight group, strongest first; a nested list puts several fields in one group. Pass the index from the table's `indexes` to `fullTextMatches` and `fullTextRank` to search the same document.\",\n\tpositional: [{\n\t\tkey: \"fields\",\n\t\ttype: oneOf(fullTextField, list(oneOf(fullTextField, list(fullTextField)), {\n\t\t\tallowEmpty: false,\n\t\t\tlabel: \"(field name | field name[])[]\"\n\t\t})),\n\t\tdocumentation: \"The fields to index: one field, or a list of fields and lists of fields. Each top-level item is a weight group, from A down to D.\"\n\t}],\n\tnamed: {\n\t\tlanguage: {\n\t\t\ttype: optional(oneOf(str(firstLanguage), ...remainingLanguages.map((language) => str(language)))),\n\t\t\tdocumentation: \"The text-search configuration. Defaults to `english`, and must match the language the query operations are given.\"\n\t\t},\n\t\tname: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The index name. Mutually exclusive with `map`.\"\n\t\t},\n\t\tmap: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The database index name. Mutually exclusive with `name`.\"\n\t\t},\n\t\twhere: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The SQL predicate restricting rows included in a partial index.\"\n\t\t}\n\t},\n\trefine: (value, ctx, attributeNode) => {\n\t\tconst diagnostics = fullTextIndexProblems({ weightGroups: weightGroupsOf(value.fields, isFieldName) }).filter(isPslFullTextIndexProblem).map((problem) => leafDiagnostic(ctx, attributeNode, describeFullTextIndexProblem(\"`@@fullTextIndex`\", problem), FULL_TEXT_INDEX_PROBLEM_CODES[problem.kind]));\n\t\tif (value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` requires a `name` or `map` argument\", PSL_FULL_TEXT_INDEX_REQUIRES_NAME));\n\t\tif (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` takes at most one of `name` and `map`\", PSL_FULL_TEXT_INDEX_NAME_XOR_MAP));\n\t\treturn diagnostics;\n\t}\n});\nfunction isFieldName(value) {\n\treturn typeof value === \"string\";\n}\nfunction isPslFullTextIndexProblem(problem) {\n\treturn problem.kind !== \"unique\" && problem.kind !== \"no-fields\";\n}\nconst FULL_TEXT_INDEX_PROBLEM_CODES = {\n\t\"too-many-groups\": PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS,\n\t\"empty-group\": PSL_FULL_TEXT_INDEX_EMPTY_GROUP,\n\t\"duplicate-field\": PSL_FULL_TEXT_INDEX_DUPLICATE_FIELD,\n\t\"not-text\": PSL_FULL_TEXT_INDEX_TEXT_FIELD\n};\nconst postgresFullTextIndexSpecFactory = () => postgresFullTextIndexSpec;\n/**\n* `@@` model attributes contributed by the Postgres target pack.\n*\n* `@@rls` is argument-less: presence marks the model's table\n* RLS-controlled. It lowers to a {@link PostgresRlsEnablement} marker in\n* the namespace's `entries.rls`, keyed by the model's table name — the\n* marker (never the policy set) is what drives\n* `ENABLE`/`DISABLE ROW LEVEL SECURITY` planning.\n*/\nconst postgresAuthoringModelAttributes = {\n\trls: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"rls\",\n\t\tspec: postgresRlsSpecFactory,\n\t\tlower: (_parsed, ctx) => ({\n\t\t\tkey: ctx.storageName,\n\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\ttableName: ctx.storageName,\n\t\t\t\tnamespaceId: ctx.namespaceId\n\t\t\t})\n\t\t})\n\t},\n\tfullTextIndex: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"fullTextIndex\",\n\t\tspec: postgresFullTextIndexSpecFactory,\n\t\trepeatable: true,\n\t\tlower: (parsed, ctx) => {\n\t\t\tconst fieldGroups = weightGroupsOf(parsed.fields, isFieldName);\n\t\t\tconst problems = fullTextIndexProblems({\n\t\t\t\tweightGroups: fieldGroups,\n\t\t\t\tcodecs: {\n\t\t\t\t\tcodecIdOf: (fieldName) => ctx.fieldStorageName(fieldName) === void 0 ? void 0 : ctx.fieldCodecId(fieldName),\n\t\t\t\t\ttraitsOf: postgresCodecTraitsOf\n\t\t\t\t}\n\t\t\t}).filter(isPslFullTextIndexProblem);\n\t\t\tfor (const problem of problems) ctx.diagnostics?.push({\n\t\t\t\tcode: FULL_TEXT_INDEX_PROBLEM_CODES[problem.kind],\n\t\t\t\tmessage: describeFullTextIndexProblem(\"`@@fullTextIndex`\", problem, (fieldName) => `${ctx.modelName}.${fieldName}`),\n\t\t\t\tsourceId: ctx.sourceId ?? \"unknown\"\n\t\t\t});\n\t\t\tif (problems.length > 0) return void 0;\n\t\t\tconst weightGroups = fieldGroups.map((group) => group.map((fieldName) => {\n\t\t\t\tconst columnName = ctx.fieldStorageName(fieldName);\n\t\t\t\tassertDefined(columnName, `@@fullTextIndex field \"${fieldName}\" has no storage column`);\n\t\t\t\treturn columnName;\n\t\t\t}));\n\t\t\treturn { index: {\n\t\t\t\tcolumns: weightGroups.flat(),\n\t\t\t\ttype: FULL_TEXT_INDEX_TYPE,\n\t\t\t\toptions: {\n\t\t\t\t\tweightGroups,\n\t\t\t\t\tlanguage: parsed.language ?? \"english\"\n\t\t\t\t},\n\t\t\t\twhere: parsed.where,\n\t\t\t\tunique: void 0,\n\t\t\t\tname: parsed.name,\n\t\t\t\tmap: parsed.map\n\t\t\t} };\n\t\t}\n\t}\n};\nconst postgresAuthoringFieldPresets = {\n\ttext: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/text@1\" }\n\t},\n\tint: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/int4@1\" }\n\t},\n\tbigint: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/int8@1\" }\n\t},\n\tfloat: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/float8@1\" }\n\t},\n\tdecimal: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/numeric@1\" }\n\t},\n\tboolean: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/bool@1\" }\n\t},\n\tjson: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/jsonb@1\" }\n\t},\n\tbytes: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/bytea@1\" }\n\t},\n\tdateTime: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/timestamptz-temporal@1\" }\n\t},\n\ttemporal: {\n\t\tcreatedAtJsDate: (/* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_DATE_CODEC_ID]\n\t\t})).createdAt,\n\t\tupdatedAtJsDate: (/* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_DATE_CODEC_ID]\n\t\t})).updatedAt,\n\t\ttimestamptzJsDate: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_DATE_CODEC_ID]\n\t\t}),\n\t\t.../* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]\n\t\t}),\n\t\t.../* @__PURE__ */ temporalStringAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_STRING_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_STRING_CODEC_ID]\n\t\t}),\n\t\ttimestamp: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMP_TEMPORAL_CODEC_ID]\n\t\t}),\n\t\ttimestamptz: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]\n\t\t}),\n\t\ttimestampString: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMP_STRING_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMP_STRING_CODEC_ID]\n\t\t}),\n\t\ttimestamptzString: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMPTZ_STRING_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_STRING_CODEC_ID]\n\t\t})\n\t},\n\tuuidNative: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/uuid@1\" }\n\t},\n\tid: {\n\t\tuuidv4Native: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7Native: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n* Resolves an entity handle's `target` ref to a table coordinate of this\n* contract, or throws the load-time diagnostic naming the handle: a\n* cross-space target is rejected (you cannot CREATE POLICY on a table\n* another space owns) and an unresolved target names the model.\n*/\nfunction requireLocalTarget(refs, subject) {\n\tconst target = refs[\"target\"];\n\tif (target !== void 0 && target.kind === \"resolved\") return {\n\t\tnamespaceId: target.namespaceId,\n\t\ttableName: target.tableName\n\t};\n\tif (target !== void 0 && target.kind === \"cross-space\") throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: ${subject} targets model \"${target.modelName ?? target.tableName}\", which lives in another contract space. Policies and rlsEnabled entries must target a model declared in this contract.`, { meta: {\n\t\tmodel: target.modelName ?? target.tableName,\n\t\treason: \"cross-space-target\"\n\t} });\n\tthrow postgresError(\"CONTRACT.MODEL_UNKNOWN\", `defineContract: ${subject} targets model \"${target?.modelName ?? \"<anonymous>\"}\", which is not in the contract's models. Add the model to \\`models\\`.`, { meta: { model: target?.modelName ?? \"<anonymous>\" } });\n}\n/**\n* The SQL-family entity-handle batch lowering hook for the Postgres pack\n* (`SqlEntityHandleLoweringContribution`). Receives every `entities` handle\n* whose kind this pack registered — batch, so the cross-entity diagnostics\n* (duplicate prefix, policy without rlsEnabled, duplicate role) can see\n* sibling handles — and lowers them with the same keying and hash assembly\n* as the PSL path: `policy` keyed by prefix (wire name via\n* {@link buildRlsPolicyEntity}), `rls` keyed by table name, `role` keyed by\n* name and filed under the default namespace (roles are declared\n* contract-wide; PSL has no role block to set a precedent).\n*/\nfunction postgresLowerEntityHandles(input) {\n\tconst enablements = /* @__PURE__ */ new Map();\n\tconst roles = /* @__PURE__ */ new Map();\n\tconst policies = [];\n\tconst coordinateKey = (coordinate) => `${coordinate.namespaceId} ${coordinate.tableName}`;\n\tfor (const { handle, refs } of input.handles) switch (handle.entityKind) {\n\t\tcase \"rls\": {\n\t\t\tconst coordinate = requireLocalTarget(refs, \"an rlsEnabled entry\");\n\t\t\tconst key = coordinateKey(coordinate);\n\t\t\tif (!enablements.has(key)) enablements.set(key, {\n\t\t\t\tcoordinate,\n\t\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\t\tnamespaceId: coordinate.namespaceId\n\t\t\t\t})\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"role\": {\n\t\t\tconst roleHandle = blindCast(handle);\n\t\t\tif (roles.has(roleHandle.name)) throw postgresError(\"CONTRACT.ROLE_INVALID\", `defineContract: role \"${roleHandle.name}\" is declared more than once in the entities list.`, { meta: {\n\t\t\t\trole: roleHandle.name,\n\t\t\t\treason: \"duplicate\"\n\t\t\t} });\n\t\t\troles.set(roleHandle.name, new PostgresRole({\n\t\t\t\tname: roleHandle.name,\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t\t\t}));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"policy\": {\n\t\t\tconst policyHandle = blindCast(handle);\n\t\t\tpolicies.push({\n\t\t\t\thandle: policyHandle,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tdefault: throw postgresError(\"CONTRACT.ENTITY_KIND_INVALID\", `defineContract: the postgres pack does not lower \"${handle.entityKind}\" handles from the entities list.`, { meta: { entityKind: handle.entityKind } });\n\t}\n\tconst rows = [];\n\tconst seenPrefixes = /* @__PURE__ */ new Set();\n\tfor (const { handle: policy, refs } of policies) {\n\t\tconst prefix = policy.name;\n\t\tassertWireNamePrefixLength(prefix, \"defineContract: policy prefix\");\n\t\tconst coordinate = requireLocalTarget(refs, `policy \"${prefix}\"`);\n\t\tif (!enablements.has(coordinateKey(coordinate))) {\n\t\t\tconst target = refs[\"target\"];\n\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy \"${prefix}\" targets model \"${target?.modelName ?? coordinate.tableName}\", whose table is not RLS-enabled. Add rlsEnabled(<model>) to the entities list.`, { meta: {\n\t\t\t\tprefix,\n\t\t\t\tmodel: target?.modelName ?? coordinate.tableName,\n\t\t\t\treason: \"target-not-rls-enabled\"\n\t\t\t} });\n\t\t}\n\t\tconst prefixKey = `${coordinate.namespaceId} ${prefix}`;\n\t\tif (seenPrefixes.has(prefixKey)) throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy prefix \"${prefix}\" is declared more than once in namespace \"${coordinate.namespaceId}\". Policy prefixes must be unique per namespace.`, { meta: {\n\t\t\tprefix,\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\treason: \"duplicate-prefix\"\n\t\t} });\n\t\tseenPrefixes.add(prefixKey);\n\t\tconst roleNames = [...new Set(policy.roles.map((roleHandle) => roleHandle.name))].sort();\n\t\trows.push({\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\tentityKind: \"policy\",\n\t\t\tkey: prefix,\n\t\t\tentity: buildRlsPolicyEntity({\n\t\t\t\tprefix,\n\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\t\toperation: policy.operation,\n\t\t\t\troles: roleNames,\n\t\t\t\t...ifDefined(\"using\", policy.using),\n\t\t\t\t...ifDefined(\"withCheck\", policy.withCheck)\n\t\t\t})\n\t\t});\n\t}\n\tfor (const { coordinate, entity } of enablements.values()) rows.push({\n\t\tnamespaceId: coordinate.namespaceId,\n\t\tentityKind: \"rls\",\n\t\tkey: coordinate.tableName,\n\t\tentity\n\t});\n\tfor (const [name, entity] of roles) rows.push({\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\tentityKind: \"role\",\n\t\tkey: name,\n\t\tentity\n\t});\n\treturn rows;\n}\n//#endregion\nexport { postgresAuthoringPslBlockDescriptors as a, postgresNowGeneratorIdFor as c, plainDateTimeNowControlDescriptor as d, INSTANT_NOW_GENERATOR_ID as f, postgresAuthoringModelAttributes as i, PLAIN_DATE_TIME_NOW_GENERATOR_ID as l, instantNowControlDescriptor as m, postgresAuthoringEntityTypes as n, postgresAuthoringTypes as o, instantNow as p, postgresAuthoringFieldPresets as r, postgresLowerEntityHandles as s, POLICY_BLOCK_KEYWORDS as t, plainDateTimeNow as u };\n\n//# sourceMappingURL=authoring-CL05jlfX.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,2BAA2B;AACjC,SAAS,8BAA8B;CACtC,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;AACA,SAAS,aAAa;CACrB,OAAO,gBAAgB,EAAE,aAAa,yBAAyB,CAAC,CAAC,CAAC,IAAI,QAAQ;AAC/E;;;;;;AAQA,MAAM,mCAAmC;AACzC,SAAS,oCAAoC;CAC5C,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;AACA,SAAS,mBAAmB;CAC3B,OAAO,gBAAgB,EAAE,aAAa,iCAAiC,CAAC,CAAC,CAAC,IAAI,iBAAiB,KAAK;AACrG;;AAIA,MAAM,0BAA0B;EAC9B,iCAAiC;EACjC,mCAAmC;EACnC,+BAA+B;EAC/B,+BAA+B;EAC/B,iCAAiC;AACnC;AACA,MAAM,0BAA0B,IAAI,IAAI,OAAO,QAAQ,uBAAuB,CAAC;AAC/E,SAAS,0BAA0B,SAAS;CAC3C,OAAO,wBAAwB,IAAI,OAAO;AAC3C;AAGA,MAAM,yBAAyB;AAC/B,MAAM,sCAAsC;AAC5C,MAAM,kCAAkC;AACxC,MAAM,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;EACA,MAAM,YAAY,GAAG,WAAW,YAAY,GAAG;EAC/C,IAAI,aAAa,IAAI,SAAS,GAAG,MAAM,cAAc,2BAA2B,kCAAkC,OAAO,6CAA6C,WAAW,YAAY,mDAAmD,EAAE,MAAM;GACvP;GACA,aAAa,WAAW;GACxB,QAAQ;EACT,EAAE,CAAC;EACH,aAAa,IAAI,SAAS;EAC1B,MAAM,YAAY,CAAC,GAAG,IAAI,IAAI,OAAO,MAAM,KAAK,eAAe,WAAW,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK;EACvF,KAAK,KAAK;GACT,aAAa,WAAW;GACxB,YAAY;GACZ,KAAK;GACL,QAAQ,qBAAqB;IAC5B;IACA,WAAW,WAAW;IACtB,aAAa,WAAW;IACxB,WAAW,OAAO;IAClB,OAAO;IACP,GAAG,UAAU,SAAS,OAAO,KAAK;IAClC,GAAG,UAAU,aAAa,OAAO,SAAS;GAC3C,CAAC;EACF,CAAC;CACF;CACA,KAAK,MAAM,EAAE,YAAY,YAAY,YAAY,OAAO,GAAG,KAAK,KAAK;EACpE,aAAa,WAAW;EACxB,YAAY;EACZ,KAAK,WAAW;EAChB;CACD,CAAC;CACD,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,KAAK,KAAK;EAC7C,aAAa;EACb,YAAY;EACZ,KAAK;EACL;CACD,CAAC;CACD,OAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-CLNoGwgA-DPDmJeBt.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/authoring-CLNoGwgA.d.mts"],"mappings":";;;;;;;iBAMiB,sDAAsD;WAC5D,uCAAuC,uDAAuD;WAC9F,iDAAiD,uDAAuD;WACxG;WACA;;iBAEM,0DAA0D;WAChE,uCAAuC,uDAAuD;WAC9F,iDAAiD,uDAAuD;WACxG;WACA;;iBAEM,2DAA2D;WACjE,uCAAuC,uDAAuD;WAC9F,iDAAiD,uDAAuD;WACxG;WACA;WACA;;KAEN,oBAAoB,WAAW,kBAAkB;UAC5C,gCAAgC,wBAAwB;WACvD;WACA,oBAAoB;;iBAEd,2CAA2C;iBAC3C,iDAAiD,aAAa;;UAErE,2BAA2B;WAC1B;;;;;;;;;;;;;iBAaM,2BAA2B,OAAO,qCAAqC"}
|