@prisma/orm-target-postgres 8.0.0-rc.11-dev.37 → 8.0.0-rc.11-dev.39
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-bTD1EPrl-2TWKoOVx.mjs → adapter-BQjOLpLF-DjdhmoYt.mjs} +7 -5
- package/dist/adapter-BQjOLpLF-DjdhmoYt.mjs.map +1 -0
- package/dist/adapter.d.mts +2 -3
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.d.mts +1 -1
- package/dist/adapter__control.mjs +3 -3
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +4 -5
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{authoring-hMsx7htU-MzchK-oB.mjs → authoring-CniOubLM-CbhqVEcC.mjs} +88 -14
- package/dist/authoring-CniOubLM-CbhqVEcC.mjs.map +1 -0
- package/dist/{control-DUGbVzYt.mjs → control-C5bibN_Q.mjs} +5 -5
- package/dist/{control-DUGbVzYt.mjs.map → control-C5bibN_Q.mjs.map} +1 -1
- package/dist/{control-adapter-Bdz-Xa1p-DvSr3dSd.mjs → control-adapter-CoDlAe4p-C7reTsaW.mjs} +3 -3
- package/dist/{control-adapter-Bdz-Xa1p-DvSr3dSd.mjs.map → control-adapter-CoDlAe4p-C7reTsaW.mjs.map} +1 -1
- package/dist/{control-policy-Bt4h9XRP-D286Iyv0.mjs → control-policy-C0f_MdP8-DNJBynf7.mjs} +4 -4
- package/dist/{control-policy-Bt4h9XRP-D286Iyv0.mjs.map → control-policy-C0f_MdP8-DNJBynf7.mjs.map} +1 -1
- package/dist/{descriptor-meta-D9xFYKRF-Dl74gakf.mjs → descriptor-meta-CIeOZJpe-C9c6s9oy.mjs} +9 -4
- package/dist/{descriptor-meta-D9xFYKRF-Dl74gakf.mjs.map → descriptor-meta-CIeOZJpe-C9c6s9oy.mjs.map} +1 -1
- package/dist/{descriptor-meta-TrRobK4g-CQJJoHqf.mjs → descriptor-meta-CLCajYZj-FAx62ZG-.mjs} +8 -32
- package/dist/descriptor-meta-CLCajYZj-FAx62ZG-.mjs.map +1 -0
- package/dist/{diff-database-schema-BAiMsL_e-CTXBlIlV.mjs → diff-database-schema-Cf2_tOQT-FatzfLUz.mjs} +3 -3
- package/dist/{diff-database-schema-BAiMsL_e-CTXBlIlV.mjs.map → diff-database-schema-Cf2_tOQT-FatzfLUz.mjs.map} +1 -1
- package/dist/{errors-5fMq0U66.d.mts → errors-BcF1S3mV.d.mts} +2 -2
- package/dist/{errors-5fMq0U66.d.mts.map → errors-BcF1S3mV.d.mts.map} +1 -1
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{op-factory-call-BAtE9hKE-xuF-YyXB.mjs → op-factory-call-DrO2ojHT-CEWsFOHI.mjs} +3 -3
- package/dist/{op-factory-call-BAtE9hKE-xuF-YyXB.mjs.map → op-factory-call-DrO2ojHT-CEWsFOHI.mjs.map} +1 -1
- package/dist/operation-types-BNp5Daje.d.mts +71 -0
- package/dist/operation-types-BNp5Daje.d.mts.map +1 -0
- package/dist/{pack-5TvJBjeX.d.mts → pack-DQegWXXx.d.mts} +34 -1
- package/dist/pack-DQegWXXx.d.mts.map +1 -0
- package/dist/{planner-CeItKM-b-DiTSmKNl.mjs → planner-DJVEdvln-4m20OBL3.mjs} +6 -6
- package/dist/{planner-CeItKM-b-DiTSmKNl.mjs.map → planner-DJVEdvln-4m20OBL3.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-BAH_r602-DSMj6CDP.mjs → planner-produced-postgres-migration-5P8B01dP-BYOLI08i.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-BAH_r602-DSMj6CDP.mjs.map → planner-produced-postgres-migration-5P8B01dP-BYOLI08i.mjs.map} +1 -1
- package/dist/{planner-sql-checks-wYIWo6ux-BCV1kDf6.mjs → planner-sql-checks-BZqyX9R1-D47zR6P-.mjs} +2 -2
- package/dist/{planner-sql-checks-wYIWo6ux-BCV1kDf6.mjs.map → planner-sql-checks-BZqyX9R1-D47zR6P-.mjs.map} +1 -1
- package/dist/{postgres-contract-view-eySKTszQ-CtakBpl3.mjs → postgres-contract-view-CG5jf5TZ-DJ32uIq6.mjs} +3 -3
- package/dist/{postgres-contract-view-eySKTszQ-CtakBpl3.mjs.map → postgres-contract-view-CG5jf5TZ-DJ32uIq6.mjs.map} +1 -1
- package/dist/{postgres-migration-DPD4Q7tc-CaWigdRj.mjs → postgres-migration-Dm-K5enl-CqLMsqCd.mjs} +4 -4
- package/dist/{postgres-migration-DPD4Q7tc-CaWigdRj.mjs.map → postgres-migration-Dm-K5enl-CqLMsqCd.mjs.map} +1 -1
- package/dist/{prisma7-binding-COPEubZc.mjs → prisma7-binding-DW2FJ0Pq.mjs} +3 -3
- package/dist/{prisma7-binding-COPEubZc.mjs.map → prisma7-binding-DW2FJ0Pq.mjs.map} +1 -1
- package/dist/{prisma7-binding-BlGmTeNp.d.mts → prisma7-binding-jsMIoDg0.d.mts} +34 -1
- package/dist/prisma7-binding-jsMIoDg0.d.mts.map +1 -0
- package/dist/{runtime-BRbiY5Vj.d.mts → runtime-BaG2Cf07.d.mts} +3 -1
- package/dist/runtime-BaG2Cf07.d.mts.map +1 -0
- package/dist/{sql-renderer-DsyAnn56-fBvRbPLM.mjs → sql-renderer-BnTqIzZw-CMA2QgFY.mjs} +7 -7
- package/dist/{sql-renderer-DsyAnn56-fBvRbPLM.mjs.map → sql-renderer-BnTqIzZw-CMA2QgFY.mjs.map} +1 -1
- package/dist/{sql-utils-DW6fkczF.d.mts → sql-utils-9CdIjv89.d.mts} +19 -2
- package/dist/sql-utils-9CdIjv89.d.mts.map +1 -0
- package/dist/target.d.mts +8 -6
- package/dist/target.mjs +13 -12
- package/dist/target__control.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__errors.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__operation-types.d.mts +3 -0
- 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-sql-checks.mjs +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.d.mts +1 -1
- package/dist/target__runtime.mjs +168 -2
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__sql-utils.d.mts +3 -2
- package/dist/target__sql-utils.mjs +2 -1
- package/dist/text-search-languages-B9_t3ep--DaX5ZABJ.mjs +70 -0
- package/dist/text-search-languages-B9_t3ep--DaX5ZABJ.mjs.map +1 -0
- package/dist/text-search-languages-BzhBMCtK-D26JB2w3.d.mts +12 -0
- package/dist/text-search-languages-BzhBMCtK-D26JB2w3.d.mts.map +1 -0
- package/package.json +10 -10
- package/dist/adapter-bTD1EPrl-2TWKoOVx.mjs.map +0 -1
- package/dist/adapter__operation-types.d.mts +0 -2
- package/dist/authoring-hMsx7htU-MzchK-oB.mjs.map +0 -1
- package/dist/descriptor-meta-TrRobK4g-CQJJoHqf.mjs.map +0 -1
- package/dist/operation-types-BfRocNI8.d.mts +0 -22
- package/dist/operation-types-BfRocNI8.d.mts.map +0 -1
- package/dist/pack-5TvJBjeX.d.mts.map +0 -1
- package/dist/prisma7-binding-BlGmTeNp.d.mts.map +0 -1
- package/dist/runtime-BRbiY5Vj.d.mts.map +0 -1
- package/dist/sql-utils-DW6fkczF.d.mts.map +0 -1
- /package/dist/{adapter__operation-types.mjs → target__operation-types.mjs} +0 -0
package/dist/target.d.mts
CHANGED
|
@@ -13,7 +13,8 @@ import { _ as PostgresDisableRowLevelSecurity, a as DdlIndexElements, b as Postg
|
|
|
13
13
|
import "./ddl-B4Rh8ntj.mjs";
|
|
14
14
|
import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-D9WbKo20.mjs";
|
|
15
15
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-DqJlOTeX.mjs";
|
|
16
|
-
import {
|
|
16
|
+
import { n as FullTextSearchLanguage, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-BzhBMCtK-D26JB2w3.mjs";
|
|
17
|
+
import { a as quoteQualifiedName, i as quoteIdentifier, n as isFullTextIndexableCodec, o as renderFullTextIndexExpression, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-9CdIjv89.mjs";
|
|
17
18
|
import { t as postgresAggregateDescriptors } from "./aggregates-CgqNfj2O.mjs";
|
|
18
19
|
import { A as PG_TIME_TEMPORAL_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as SQL_CHAR_CODEC_ID, I as SQL_FLOAT_CODEC_ID, L as SQL_INT_CODEC_ID, M as PG_UUID_CODEC_ID, N as PG_VARBIT_CODEC_ID, O as PG_TIMETZ_CODEC_ID, P as PG_VARCHAR_CODEC_ID, R as SQL_TEXT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, i as PG_CHAR_CODEC_ID, j as PG_UNBOUNDED_INT_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_ENUM_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID, y as PG_JSON_CODEC_ID, z as SQL_VARCHAR_CODEC_ID } from "./codec-ids-CiBCuaJN-BMYRDoSy.mjs";
|
|
19
20
|
import "./codec-ids-CglZIuVF.mjs";
|
|
@@ -28,14 +29,15 @@ import { t as postgresRenderDefault } from "./control-BvK2pHHh.mjs";
|
|
|
28
29
|
import { n as DataTransformOptions, r as dataTransform, t as DataTransformClosure } from "./data-transform-Ck5FbyNO-BNE7QlAo.mjs";
|
|
29
30
|
import "./data-transform-BSM7TQpE.mjs";
|
|
30
31
|
import { t as buildPostgresPlanDiff } from "./diff-database-schema-DsoNznGC.mjs";
|
|
31
|
-
import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-
|
|
32
|
+
import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-BcF1S3mV.mjs";
|
|
32
33
|
import { C as DropIndexCall, D as DropTableCall, E as DropPostgresRlsPolicyCall, F as RenamePostgresRlsPolicyCall, I as SetDefaultCall, L as SetNotNullCall, M as RawSqlCall, N as RenameCheckConstraintCall, O as EnableRowLevelSecurityCall, P as RenameIndexCall, S as DropDefaultCall, T as DropNotNullCall, _ as DataTransformCall, a as AddNotNullColumnWithTempDefaultCall, b as DropColumnCall, c as AlterColumnTypeCall, d as CreateIndexCall, g as CreateTableCall, h as CreateSchemaCall, i as AddNativeEnumValueCall, m as CreatePostgresRlsPolicyCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreateNativeEnumTypeCall, r as AddForeignKeyCall, s as AddUniqueCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DisableRowLevelSecurityCall, w as DropNativeEnumTypeCall, x as DropConstraintCall, y as DropCheckConstraintCall } from "./op-factory-call-BAeyLFYf-BAgG1h1C.mjs";
|
|
33
34
|
import { n as planIssues, t as coalesceSubtreeIssues } from "./issue-planner-Biq9Ls7e.mjs";
|
|
34
35
|
import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
|
|
35
36
|
import { t as PostgresMigration } from "./postgres-migration-BNsrwlxh-CwI5BqAu.mjs";
|
|
36
37
|
import { a as fn, c as placeholder, d as unique, i as createExtension, l as primaryKey, n as checkExpression, o as foreignKey, r as col, s as lit, t as MigrationCLI, u as rawSql } from "./migration-aFeTWTOJ.mjs";
|
|
37
38
|
import "./op-factory-call-BTU8I_x0.mjs";
|
|
38
|
-
import "./
|
|
39
|
+
import { i as QueryOperationTypes, n as FullTextMatchesOptions, r as FullTextRankOptions, t as FullTextHeadlineOptions } from "./operation-types-BNp5Daje.mjs";
|
|
40
|
+
import "./pack-DQegWXXx.mjs";
|
|
39
41
|
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-BaviT8KK-Yo9kw6rs.mjs";
|
|
40
42
|
import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-CT-7zSfk.mjs";
|
|
41
43
|
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-bBCUsq_0.mjs";
|
|
@@ -43,9 +45,9 @@ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./pla
|
|
|
43
45
|
import "./planner-produced-postgres-migration-D6C0T2xV.mjs";
|
|
44
46
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-C4DHAddq.mjs";
|
|
45
47
|
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-CFgbRTJw.mjs";
|
|
46
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
48
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-jsMIoDg0.mjs";
|
|
47
49
|
import { t as renderOps } from "./render-ops-DPwhZt2W.mjs";
|
|
48
50
|
import { t as renderCallsToTypeScript } from "./render-typescript-6sCFvMBh.mjs";
|
|
49
|
-
import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-
|
|
51
|
+
import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-BaG2Cf07.mjs";
|
|
50
52
|
import { t as resolveDdlSchemaForNamespaceStorage } from "./schema-ir-annotations-DuuYh0gl.mjs";
|
|
51
|
-
export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, INSTANT_NOW_GENERATOR_ID, type IndexExistsCheckBuilder, Interval, type JsonValue$1 as JsonValue, PostgresMigration as Migration, MigrationCLI, Numeric, 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_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, type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgInt8NumberDescriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, type PgTimetzDescriptor, type PgUnboundedIntDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, type PostgresCheckExpressionCandidate, type PostgresCheckExpressionInput, type PostgresCheckKind, PostgresCodecDescriptor, type PostgresCodecDescriptorRegistry, type PostgresCodecOptions, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresListDecoder, PostgresNamespaceSchemaNode, type PostgresNamespaceSchemaNodeInput, PostgresNativeEnum, type PostgresNativeEnumInput, PostgresNativeEnumSchemaNode, type PostgresNativeEnumSchemaNodeInput, type PostgresPlanTargetDetails, PostgresPolicySchemaNode, type PostgresPolicySchemaNodeInput, PostgresRlsEnablement, type PostgresRlsEnablementInput, PostgresRlsPolicy, type PostgresRlsPolicyInput, PostgresRole, type PostgresRoleInput, PostgresRoleSchemaNode, type PostgresRoleSchemaNodeInput, PostgresRuntimeTargetInstance, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, type PostgresTableSchemaNodeInput, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, type RenderedRlsPolicyLiteral, type RlsEnabledCheckBuilder, type RlsPolicyExistsCheckBuilder, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SerializedRlsPolicy, SetDefaultCall, SetNotNullCall, type TableExistsCheckBuilder, type TablePrimaryKeyCheckBuilder, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, unique, validateEnumValueLength };
|
|
53
|
+
export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, type FullTextHeadlineOptions, type FullTextMatchesOptions, type FullTextRankOptions, type FullTextSearchLanguage, INSTANT_NOW_GENERATOR_ID, type IndexExistsCheckBuilder, Interval, type JsonValue$1 as JsonValue, PostgresMigration as Migration, MigrationCLI, Numeric, 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_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, type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgInt8NumberDescriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, type PgTimetzDescriptor, type PgUnboundedIntDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, type PostgresCheckExpressionCandidate, type PostgresCheckExpressionInput, type PostgresCheckKind, PostgresCodecDescriptor, type PostgresCodecDescriptorRegistry, type PostgresCodecOptions, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresListDecoder, PostgresNamespaceSchemaNode, type PostgresNamespaceSchemaNodeInput, PostgresNativeEnum, type PostgresNativeEnumInput, PostgresNativeEnumSchemaNode, type PostgresNativeEnumSchemaNodeInput, type PostgresPlanTargetDetails, PostgresPolicySchemaNode, type PostgresPolicySchemaNodeInput, PostgresRlsEnablement, type PostgresRlsEnablementInput, PostgresRlsPolicy, type PostgresRlsPolicyInput, PostgresRole, type PostgresRoleInput, PostgresRoleSchemaNode, type PostgresRoleSchemaNodeInput, PostgresRuntimeTargetInstance, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, type PostgresTableSchemaNodeInput, PostgresTableSource, PostgresUnboundSchema, type QueryOperationTypes, RawSqlCall, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, type RenderedRlsPolicyLiteral, type RlsEnabledCheckBuilder, type RlsPolicyExistsCheckBuilder, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SerializedRlsPolicy, SetDefaultCall, SetNotNullCall, type TableExistsCheckBuilder, type TablePrimaryKeyCheckBuilder, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, isFullTextIndexableCodec, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderFullTextIndexExpression, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, unique, validateEnumValueLength };
|
package/dist/target.mjs
CHANGED
|
@@ -11,29 +11,30 @@ import { a as PostgresAlterTable, c as PostgresCreateSchema, d as PostgresDdlNod
|
|
|
11
11
|
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, a as columnDefaultAst, b as extensionExistsAst, c as columnTypeAst, f as createSchema, g as dropDefaultAction, i as alterTable, k as tablePrimaryKeyAst, l as constraintExistsAst, o as columnExistsAst, p as createTable, s as columnNullabilityAst, t as addColumnAction, w as noNullValuesAst, x as indexExistsAst } from "./ddl-DxYRJ8hY-mFzFol6l.mjs";
|
|
12
12
|
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-CmBUYWYN.mjs";
|
|
13
13
|
import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-Bjtm2F4f-uV5vvkVt.mjs";
|
|
14
|
+
import { a as renderFullTextIndexExpression, r as isFullTextIndexableCodec, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-B9_t3ep--DaX5ZABJ.mjs";
|
|
14
15
|
import { n as computeContentHash, t as POLICY_OPERATION_PREDICATES } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
|
|
15
|
-
import { a as plainDateTimeNow, i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
16
|
+
import { a as plainDateTimeNow, i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CniOubLM-CbhqVEcC.mjs";
|
|
16
17
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-DFTeR0rd-CSxSpyMV.mjs";
|
|
17
18
|
import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
18
19
|
import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
19
20
|
import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-DFOTYsNN-AVDEd24I.mjs";
|
|
20
|
-
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-
|
|
21
|
+
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-BZqyX9R1-D47zR6P-.mjs";
|
|
21
22
|
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-DTCYp-qA-DF16uM8O.mjs";
|
|
22
|
-
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as createExtension, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-
|
|
23
|
+
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as createExtension, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DrO2ojHT-CEWsFOHI.mjs";
|
|
23
24
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-BmHn5C6U-BYBbUAyR.mjs";
|
|
24
25
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs";
|
|
25
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-
|
|
26
|
-
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
27
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
26
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-C0f_MdP8-DNJBynf7.mjs";
|
|
27
|
+
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-Cf2_tOQT-FatzfLUz.mjs";
|
|
28
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-CG5jf5TZ-DJ32uIq6.mjs";
|
|
28
29
|
import { t as dataTransform } from "./data-transform-Bo32KRbq-BLn1_UG-.mjs";
|
|
29
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
30
|
+
import { t as PostgresMigration } from "./postgres-migration-Dm-K5enl-CqLMsqCd.mjs";
|
|
30
31
|
import { t as renderOps } from "./render-ops-D2vJApKB-B281fzmn.mjs";
|
|
31
32
|
import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
|
|
32
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
33
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
33
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-5P8B01dP-BYOLI08i.mjs";
|
|
34
|
+
import { t as createPostgresMigrationPlanner } from "./planner-DJVEdvln-4m20OBL3.mjs";
|
|
34
35
|
import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
35
|
-
import { t as postgresRenderDefault } from "./control-
|
|
36
|
+
import { t as postgresRenderDefault } from "./control-C5bibN_Q.mjs";
|
|
36
37
|
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";
|
|
37
38
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-yvd3tqv-.mjs";
|
|
38
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
39
|
-
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, INSTANT_NOW_GENERATOR_ID, 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_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, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, 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, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, unique, validateEnumValueLength };
|
|
39
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-DW2FJ0Pq.mjs";
|
|
40
|
+
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, INSTANT_NOW_GENERATOR_ID, 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_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, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, 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, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, isFullTextIndexableCodec, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderFullTextIndexExpression, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, unique, validateEnumValueLength };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
1
|
+
import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CniOubLM-CbhqVEcC.mjs";
|
|
2
2
|
import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
3
|
-
import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-
|
|
3
|
+
import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-C5bibN_Q.mjs";
|
|
4
4
|
export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresRenderDefault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
1
|
+
import { t as buildPostgresPlanDiff } from "./diff-database-schema-Cf2_tOQT-FatzfLUz.mjs";
|
|
2
2
|
export { buildPostgresPlanDiff };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-
|
|
1
|
+
import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-BcF1S3mV.mjs";
|
|
2
2
|
export { errorPostgresMigrationStackMissing, postgresError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-
|
|
1
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-C0f_MdP8-DNJBynf7.mjs";
|
|
2
2
|
export { coalesceSubtreeIssues, planIssues };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as createExtension } from "./op-factory-call-
|
|
1
|
+
import { F as createExtension } from "./op-factory-call-DrO2ojHT-CEWsFOHI.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-Dm-K5enl-CqLMsqCd.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 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-
|
|
1
|
+
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DrO2ojHT-CEWsFOHI.mjs";
|
|
2
2
|
export { AddCheckConstraintCall, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, RawSqlCall, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SetDefaultCall, SetNotNullCall };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { n as FullTextSearchLanguage } from "./text-search-languages-BzhBMCtK-D26JB2w3.mjs";
|
|
2
|
+
import { i as QueryOperationTypes, n as FullTextMatchesOptions, r as FullTextRankOptions, t as FullTextHeadlineOptions } from "./operation-types-BNp5Daje.mjs";
|
|
3
|
+
export type { FullTextHeadlineOptions, FullTextMatchesOptions, FullTextRankOptions, FullTextSearchLanguage, QueryOperationTypes };
|
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-DQegWXXx.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-CIeOZJpe-C9c6s9oy.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-5P8B01dP-BYOLI08i.mjs";
|
|
2
2
|
export { TypeScriptRenderablePostgresMigration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-
|
|
1
|
+
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-BZqyX9R1-D47zR6P-.mjs";
|
|
2
2
|
export { buildExpectedFormatType, qualifyTableName };
|
package/dist/target__planner.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-
|
|
2
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
1
|
+
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-Cf2_tOQT-FatzfLUz.mjs";
|
|
2
|
+
import { t as createPostgresMigrationPlanner } from "./planner-DJVEdvln-4m20OBL3.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-jsMIoDg0.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-DW2FJ0Pq.mjs";
|
|
2
2
|
export { prisma7PostgresBinding };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as decodePostgresListText, s as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./plain-date-time-now-generator-DJ3icyVr-B-rdIVd3.mjs";
|
|
2
2
|
import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
|
|
3
|
-
import { i as postgresRuntimeTargetDescriptor, n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-
|
|
3
|
+
import { i as postgresRuntimeTargetDescriptor, n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-BaG2Cf07.mjs";
|
|
4
4
|
export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, PostgresListDecoder, PostgresRuntimeTargetInstance, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -1,9 +1,174 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, n as PG_BOOL_CODEC_ID } from "./codec-ids-BYhNGq22-B6yIezG2.mjs";
|
|
2
|
+
import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
3
|
+
import { i as isFullTextSearchLanguage, n as POSTGRES_TEXT_SEARCH_LANGUAGES } from "./text-search-languages-B9_t3ep--DaX5ZABJ.mjs";
|
|
4
|
+
import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CniOubLM-CbhqVEcC.mjs";
|
|
2
5
|
import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs";
|
|
3
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
6
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-CG5jf5TZ-DJ32uIq6.mjs";
|
|
4
7
|
import { t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
8
|
+
import { LiteralExpr } from "@prisma/orm-family-sql/relational-core/ast";
|
|
9
|
+
import { buildOperation, toExpr } from "@prisma/orm-family-sql/relational-core/expression";
|
|
5
10
|
//#region ../../../3-targets/3-targets/postgres/dist/runtime.mjs
|
|
6
11
|
/**
|
|
12
|
+
* Options for the Postgres full-text operations, and the checks each one goes through.
|
|
13
|
+
*
|
|
14
|
+
* Every option here reaches the SQL as an inline literal rather than a bound parameter, because
|
|
15
|
+
* Postgres accepts no parameter in these positions. Each is therefore validated before a statement
|
|
16
|
+
* exists; anything unrecognized throws `RUNTIME.ARGUMENT_INVALID`.
|
|
17
|
+
*
|
|
18
|
+
* The headline markers are the only free text among them, and `checkMarker` restricts their
|
|
19
|
+
* characters precisely so that the literal path never carries a quote or a backslash for
|
|
20
|
+
* `escapeLiteral` to have to reason about.
|
|
21
|
+
*/
|
|
22
|
+
function invalid(method, argument, received, why, fix) {
|
|
23
|
+
return postgresError("RUNTIME.ARGUMENT_INVALID", `${method}: ${why}`, {
|
|
24
|
+
why: "The option is written into the SQL as an inline literal, not a bound parameter, so it is checked before the statement is built.",
|
|
25
|
+
fix,
|
|
26
|
+
meta: {
|
|
27
|
+
helper: method,
|
|
28
|
+
argument,
|
|
29
|
+
received
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function languageLiteral(method, language) {
|
|
34
|
+
if (!isFullTextSearchLanguage(language)) throw invalid(method, "language", language, `'${language}' is not a PostgreSQL text-search configuration Prisma recognizes.`, `Pass one of: ${POSTGRES_TEXT_SEARCH_LANGUAGES.join(", ")}.`);
|
|
35
|
+
return LiteralExpr.of(language);
|
|
36
|
+
}
|
|
37
|
+
function normalizationLiteral(method, normalization) {
|
|
38
|
+
if (!Number.isInteger(normalization) || normalization < 0 || normalization > 63) throw invalid(method, "normalization", normalization, `normalization must be an integer between 0 and 63, received ${normalization}.`, "Combine the flags documented for ts_rank, e.g. 32 to divide the rank by itself plus one.");
|
|
39
|
+
return LiteralExpr.of(normalization);
|
|
40
|
+
}
|
|
41
|
+
function checkWordCount(method, argument, value) {
|
|
42
|
+
if (!Number.isInteger(value) || value < 1) throw invalid(method, argument, value, `${argument} must be a positive integer, received ${value}.`, "Pass a whole number of words, one or more.");
|
|
43
|
+
}
|
|
44
|
+
/** Non-empty, and none of `"` `,` `=` `\` or whitespace. */
|
|
45
|
+
const MARKER = /^[^"=,\\\s]+$/;
|
|
46
|
+
function checkMarker(method, argument, value) {
|
|
47
|
+
if (!MARKER.test(value)) throw invalid(method, argument, value, `${argument} must be non-empty and free of " , = \\ and whitespace, received ${JSON.stringify(value)}.`, "ts_headline parses its options as a quoted, comma-separated list of Key=Value pairs, and the whole list reaches SQL as one literal, so a marker carrying those characters cannot survive either step. Use markup such as <mark> or <b>.");
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The fourth `ts_headline` argument: one text literal of `Key=Value` pairs. Returns `undefined` when
|
|
51
|
+
* nothing but the language was given, so the common call keeps rendering the three-argument form.
|
|
52
|
+
*/
|
|
53
|
+
function headlineOptionsLiteral(method, options) {
|
|
54
|
+
const pairs = [];
|
|
55
|
+
if (options.startSel !== void 0) {
|
|
56
|
+
checkMarker(method, "startSel", options.startSel);
|
|
57
|
+
pairs.push(`StartSel=${options.startSel}`);
|
|
58
|
+
}
|
|
59
|
+
if (options.stopSel !== void 0) {
|
|
60
|
+
checkMarker(method, "stopSel", options.stopSel);
|
|
61
|
+
pairs.push(`StopSel=${options.stopSel}`);
|
|
62
|
+
}
|
|
63
|
+
if (options.maxWords !== void 0) {
|
|
64
|
+
checkWordCount(method, "maxWords", options.maxWords);
|
|
65
|
+
pairs.push(`MaxWords=${options.maxWords}`);
|
|
66
|
+
}
|
|
67
|
+
if (options.minWords !== void 0) {
|
|
68
|
+
checkWordCount(method, "minWords", options.minWords);
|
|
69
|
+
if (options.maxWords !== void 0 && options.minWords >= options.maxWords) throw invalid(method, "minWords", options.minWords, `minWords (${options.minWords}) must be below maxWords (${options.maxWords}).`, "Postgres requires MinWords strictly below MaxWords. Lower minWords, or raise maxWords.");
|
|
70
|
+
pairs.push(`MinWords=${options.minWords}`);
|
|
71
|
+
}
|
|
72
|
+
if (options.highlightAll !== void 0) {
|
|
73
|
+
if (typeof options.highlightAll !== "boolean") throw invalid(method, "highlightAll", options.highlightAll, `highlightAll must be a boolean, received ${JSON.stringify(options.highlightAll)}.`, "Pass true to mark up the whole document, or false to extract fragments.");
|
|
74
|
+
pairs.push(`HighlightAll=${options.highlightAll}`);
|
|
75
|
+
}
|
|
76
|
+
return pairs.length === 0 ? void 0 : LiteralExpr.of(pairs.join(", "));
|
|
77
|
+
}
|
|
78
|
+
const TEXT_REF = { codecId: PG_TEXT_CODEC_ID };
|
|
79
|
+
const languageOf = (options) => options.language ?? "english";
|
|
80
|
+
function postgresQueryOperations() {
|
|
81
|
+
return {
|
|
82
|
+
ilike: {
|
|
83
|
+
self: { traits: ["textual"] },
|
|
84
|
+
impl: (self, pattern) => buildOperation({
|
|
85
|
+
method: "ilike",
|
|
86
|
+
args: [toExpr(self), toExpr(pattern, TEXT_REF)],
|
|
87
|
+
returns: {
|
|
88
|
+
codecId: PG_BOOL_CODEC_ID,
|
|
89
|
+
nullable: false
|
|
90
|
+
},
|
|
91
|
+
lowering: {
|
|
92
|
+
targetFamily: "sql",
|
|
93
|
+
strategy: "infix",
|
|
94
|
+
template: "{{self}} ILIKE {{arg0}}"
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
},
|
|
98
|
+
fullTextMatches: {
|
|
99
|
+
self: { traits: ["textual"] },
|
|
100
|
+
impl: (self, query, options = {}) => buildOperation({
|
|
101
|
+
method: "fullTextMatches",
|
|
102
|
+
args: [
|
|
103
|
+
toExpr(self),
|
|
104
|
+
toExpr(query, TEXT_REF),
|
|
105
|
+
languageLiteral("fullTextMatches", languageOf(options))
|
|
106
|
+
],
|
|
107
|
+
returns: {
|
|
108
|
+
codecId: PG_BOOL_CODEC_ID,
|
|
109
|
+
nullable: false
|
|
110
|
+
},
|
|
111
|
+
lowering: {
|
|
112
|
+
targetFamily: "sql",
|
|
113
|
+
strategy: "function",
|
|
114
|
+
template: "to_tsvector({{arg1}}, {{self}}) @@ websearch_to_tsquery({{arg1}}, {{arg0}})"
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
},
|
|
118
|
+
fullTextRank: {
|
|
119
|
+
self: { traits: ["textual"] },
|
|
120
|
+
impl: (self, query, options = {}) => {
|
|
121
|
+
const fn = options.coverDensity === true ? "ts_rank_cd" : "ts_rank";
|
|
122
|
+
const normalization = options.normalization === void 0 ? void 0 : normalizationLiteral("fullTextRank", options.normalization);
|
|
123
|
+
const vectorAndQuery = "to_tsvector({{arg1}}, {{self}}), websearch_to_tsquery({{arg1}}, {{arg0}})";
|
|
124
|
+
return buildOperation({
|
|
125
|
+
method: "fullTextRank",
|
|
126
|
+
args: [
|
|
127
|
+
toExpr(self),
|
|
128
|
+
toExpr(query, TEXT_REF),
|
|
129
|
+
languageLiteral("fullTextRank", languageOf(options)),
|
|
130
|
+
...normalization === void 0 ? [] : [normalization]
|
|
131
|
+
],
|
|
132
|
+
returns: {
|
|
133
|
+
codecId: PG_FLOAT4_CODEC_ID,
|
|
134
|
+
nullable: false
|
|
135
|
+
},
|
|
136
|
+
lowering: {
|
|
137
|
+
targetFamily: "sql",
|
|
138
|
+
strategy: "function",
|
|
139
|
+
template: `${fn}(${vectorAndQuery}${normalization === void 0 ? "" : ", {{arg2}}"})`
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
fullTextHeadline: {
|
|
145
|
+
self: { traits: ["textual"] },
|
|
146
|
+
impl: (self, query, options = {}) => {
|
|
147
|
+
const headlineOptions = headlineOptionsLiteral("fullTextHeadline", options);
|
|
148
|
+
const base = "ts_headline({{arg1}}, {{self}}, websearch_to_tsquery({{arg1}}, {{arg0}})";
|
|
149
|
+
return buildOperation({
|
|
150
|
+
method: "fullTextHeadline",
|
|
151
|
+
args: [
|
|
152
|
+
toExpr(self),
|
|
153
|
+
toExpr(query, TEXT_REF),
|
|
154
|
+
languageLiteral("fullTextHeadline", languageOf(options)),
|
|
155
|
+
...headlineOptions === void 0 ? [] : [headlineOptions]
|
|
156
|
+
],
|
|
157
|
+
returns: {
|
|
158
|
+
codecId: PG_TEXT_CODEC_ID,
|
|
159
|
+
nullable: false
|
|
160
|
+
},
|
|
161
|
+
lowering: {
|
|
162
|
+
targetFamily: "sql",
|
|
163
|
+
strategy: "function",
|
|
164
|
+
template: `${base}${headlineOptions === void 0 ? "" : ", {{arg2}}"})`
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
7
172
|
* 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
|
|
8
173
|
* `@internal/sql-runtime` consumers narrow to at composition time.
|
|
9
174
|
*
|
|
@@ -13,6 +178,7 @@ const postgresRuntimeTargetDescriptor = {
|
|
|
13
178
|
...postgresTargetDescriptorMetaRuntime,
|
|
14
179
|
codecs: () => [],
|
|
15
180
|
listDecoder: () => decodePostgresListText,
|
|
181
|
+
queryOperations: () => postgresQueryOperations(),
|
|
16
182
|
create() {
|
|
17
183
|
return {
|
|
18
184
|
familyId: "sql",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { c as PLAIN_DATE_TIME_NOW_GENERATOR_ID, d as INSTANT_NOW_GENERATOR_ID, f as instantNow, l as plainDateTimeNow } from \"./authoring-hMsx7htU.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-UwYdV8fD.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-eySKTszQ.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\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\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":";;;;;;;;;;;AAWA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,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, n as PG_BOOL_CODEC_ID } from \"./codec-ids-BYhNGq22.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { n as POSTGRES_TEXT_SEARCH_LANGUAGES, r as isFullTextSearchLanguage } from \"./text-search-languages-B9_t3ep-.mjs\";\nimport { c as PLAIN_DATE_TIME_NOW_GENERATOR_ID, d as INSTANT_NOW_GENERATOR_ID, f as instantNow, l as plainDateTimeNow } from \"./authoring-CniOubLM.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-UwYdV8fD.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-CG5jf5TZ.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { LiteralExpr } from \"@internal/sql-relational-core/ast\";\nimport { buildOperation, toExpr } from \"@internal/sql-relational-core/expression\";\n//#region src/core/full-text-options.ts\n/**\n* Options for the Postgres full-text operations, and the checks each one goes through.\n*\n* Every option here reaches the SQL as an inline literal rather than a bound parameter, because\n* Postgres accepts no parameter in these positions. Each is therefore validated before a statement\n* exists; anything unrecognized throws `RUNTIME.ARGUMENT_INVALID`.\n*\n* The headline markers are the only free text among them, and `checkMarker` restricts their\n* characters precisely so that the literal path never carries a quote or a backslash for\n* `escapeLiteral` to have to reason about.\n*/\nfunction invalid(method, argument, received, why, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${why}`, {\n\t\twhy: \"The option is written into the SQL as an inline literal, not a bound parameter, so it is checked before the statement is built.\",\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}\nfunction languageLiteral(method, language) {\n\tif (!isFullTextSearchLanguage(language)) throw invalid(method, \"language\", language, `'${language}' is not a PostgreSQL text-search configuration Prisma recognizes.`, `Pass one of: ${POSTGRES_TEXT_SEARCH_LANGUAGES.join(\", \")}.`);\n\treturn LiteralExpr.of(language);\n}\nfunction normalizationLiteral(method, normalization) {\n\tif (!Number.isInteger(normalization) || normalization < 0 || normalization > 63) throw invalid(method, \"normalization\", normalization, `normalization must be an integer between 0 and 63, received ${normalization}.`, \"Combine the flags documented for ts_rank, e.g. 32 to divide the rank by itself plus one.\");\n\treturn LiteralExpr.of(normalization);\n}\nfunction checkWordCount(method, argument, value) {\n\tif (!Number.isInteger(value) || value < 1) throw invalid(method, argument, value, `${argument} must be a positive integer, received ${value}.`, \"Pass a whole number of words, one or more.\");\n}\n/** Non-empty, and none of `\"` `,` `=` `\\` or whitespace. */\nconst MARKER = /^[^\"=,\\\\\\s]+$/;\nfunction checkMarker(method, argument, value) {\n\tif (!MARKER.test(value)) throw invalid(method, argument, value, `${argument} must be non-empty and free of \" , = \\\\ and whitespace, received ${JSON.stringify(value)}.`, \"ts_headline parses its options as a quoted, comma-separated list of Key=Value pairs, and the whole list reaches SQL as one literal, so a marker carrying those characters cannot survive either step. Use markup such as <mark> or <b>.\");\n}\n/**\n* The fourth `ts_headline` argument: one text literal of `Key=Value` pairs. Returns `undefined` when\n* nothing but the language was given, so the common call keeps rendering the three-argument form.\n*/\nfunction headlineOptionsLiteral(method, options) {\n\tconst pairs = [];\n\tif (options.startSel !== void 0) {\n\t\tcheckMarker(method, \"startSel\", options.startSel);\n\t\tpairs.push(`StartSel=${options.startSel}`);\n\t}\n\tif (options.stopSel !== void 0) {\n\t\tcheckMarker(method, \"stopSel\", options.stopSel);\n\t\tpairs.push(`StopSel=${options.stopSel}`);\n\t}\n\tif (options.maxWords !== void 0) {\n\t\tcheckWordCount(method, \"maxWords\", options.maxWords);\n\t\tpairs.push(`MaxWords=${options.maxWords}`);\n\t}\n\tif (options.minWords !== void 0) {\n\t\tcheckWordCount(method, \"minWords\", options.minWords);\n\t\tif (options.maxWords !== void 0 && options.minWords >= options.maxWords) throw invalid(method, \"minWords\", options.minWords, `minWords (${options.minWords}) must be below maxWords (${options.maxWords}).`, \"Postgres requires MinWords strictly below MaxWords. Lower minWords, or raise maxWords.\");\n\t\tpairs.push(`MinWords=${options.minWords}`);\n\t}\n\tif (options.highlightAll !== void 0) {\n\t\tif (typeof options.highlightAll !== \"boolean\") throw invalid(method, \"highlightAll\", options.highlightAll, `highlightAll must be a boolean, received ${JSON.stringify(options.highlightAll)}.`, \"Pass true to mark up the whole document, or false to extract fragments.\");\n\t\tpairs.push(`HighlightAll=${options.highlightAll}`);\n\t}\n\treturn pairs.length === 0 ? void 0 : LiteralExpr.of(pairs.join(\", \"));\n}\n//#endregion\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\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\tstrategy: \"infix\",\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: (self, query, options = {}) => buildOperation({\n\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\targs: [\n\t\t\t\t\ttoExpr(self),\n\t\t\t\t\ttoExpr(query, TEXT_REF),\n\t\t\t\t\tlanguageLiteral(\"fullTextMatches\", languageOf(options))\n\t\t\t\t],\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\tstrategy: \"function\",\n\t\t\t\t\ttemplate: \"to_tsvector({{arg1}}, {{self}}) @@ websearch_to_tsquery({{arg1}}, {{arg0}})\"\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: (self, 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 vectorAndQuery = \"to_tsvector({{arg1}}, {{self}}), websearch_to_tsquery({{arg1}}, {{arg0}})\";\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\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TEXT_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextRank\", languageOf(options)),\n\t\t\t\t\t\t...normalization === void 0 ? [] : [normalization]\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\tstrategy: \"function\",\n\t\t\t\t\t\ttemplate: `${fn}(${vectorAndQuery}${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}}, websearch_to_tsquery({{arg1}}, {{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, TEXT_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\tstrategy: \"function\",\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};\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":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,QAAQ,QAAQ,UAAU,UAAU,KAAK,KAAK;CACtD,OAAO,cAAc,4BAA4B,GAAG,OAAO,IAAI,OAAO;EACrE,KAAK;EACL;EACA,MAAM;GACL,QAAQ;GACR;GACA;EACD;CACD,CAAC;AACF;AACA,SAAS,gBAAgB,QAAQ,UAAU;CAC1C,IAAI,CAAC,yBAAyB,QAAQ,GAAG,MAAM,QAAQ,QAAQ,YAAY,UAAU,IAAI,SAAS,qEAAqE,gBAAgB,+BAA+B,KAAK,IAAI,EAAE,EAAE;CACnO,OAAO,YAAY,GAAG,QAAQ;AAC/B;AACA,SAAS,qBAAqB,QAAQ,eAAe;CACpD,IAAI,CAAC,OAAO,UAAU,aAAa,KAAK,gBAAgB,KAAK,gBAAgB,IAAI,MAAM,QAAQ,QAAQ,iBAAiB,eAAe,+DAA+D,cAAc,IAAI,0FAA0F;CAClT,OAAO,YAAY,GAAG,aAAa;AACpC;AACA,SAAS,eAAe,QAAQ,UAAU,OAAO;CAChD,IAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,GAAG,MAAM,QAAQ,QAAQ,UAAU,OAAO,GAAG,SAAS,wCAAwC,MAAM,IAAI,4CAA4C;AAC7L;;AAEA,MAAM,SAAS;AACf,SAAS,YAAY,QAAQ,UAAU,OAAO;CAC7C,IAAI,CAAC,OAAO,KAAK,KAAK,GAAG,MAAM,QAAQ,QAAQ,UAAU,OAAO,GAAG,SAAS,mEAAmE,KAAK,UAAU,KAAK,EAAE,IAAI,yOAAyO;AACnZ;;;;;AAKA,SAAS,uBAAuB,QAAQ,SAAS;CAChD,MAAM,QAAQ,CAAC;CACf,IAAI,QAAQ,aAAa,KAAK,GAAG;EAChC,YAAY,QAAQ,YAAY,QAAQ,QAAQ;EAChD,MAAM,KAAK,YAAY,QAAQ,UAAU;CAC1C;CACA,IAAI,QAAQ,YAAY,KAAK,GAAG;EAC/B,YAAY,QAAQ,WAAW,QAAQ,OAAO;EAC9C,MAAM,KAAK,WAAW,QAAQ,SAAS;CACxC;CACA,IAAI,QAAQ,aAAa,KAAK,GAAG;EAChC,eAAe,QAAQ,YAAY,QAAQ,QAAQ;EACnD,MAAM,KAAK,YAAY,QAAQ,UAAU;CAC1C;CACA,IAAI,QAAQ,aAAa,KAAK,GAAG;EAChC,eAAe,QAAQ,YAAY,QAAQ,QAAQ;EACnD,IAAI,QAAQ,aAAa,KAAK,KAAK,QAAQ,YAAY,QAAQ,UAAU,MAAM,QAAQ,QAAQ,YAAY,QAAQ,UAAU,aAAa,QAAQ,SAAS,4BAA4B,QAAQ,SAAS,KAAK,wFAAwF;EACrS,MAAM,KAAK,YAAY,QAAQ,UAAU;CAC1C;CACA,IAAI,QAAQ,iBAAiB,KAAK,GAAG;EACpC,IAAI,OAAO,QAAQ,iBAAiB,WAAW,MAAM,QAAQ,QAAQ,gBAAgB,QAAQ,cAAc,4CAA4C,KAAK,UAAU,QAAQ,YAAY,EAAE,IAAI,yEAAyE;EACzQ,MAAM,KAAK,gBAAgB,QAAQ,cAAc;CAClD;CACA,OAAO,MAAM,WAAW,IAAI,KAAK,IAAI,YAAY,GAAG,MAAM,KAAK,IAAI,CAAC;AACrE;AAGA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,0BAA0B;CAClC,OAAO;EACN,OAAO;GACN,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,YAAY,eAAe;IACvC,QAAQ;IACR,MAAM,CAAC,OAAO,IAAI,GAAG,OAAO,SAAS,QAAQ,CAAC;IAC9C,SAAS;KACR,SAAS;KACT,UAAU;IACX;IACA,UAAU;KACT,cAAc;KACd,UAAU;KACV,UAAU;IACX;GACD,CAAC;EACF;EACA,iBAAiB;GAChB,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM,eAAe;IACnD,QAAQ;IACR,MAAM;KACL,OAAO,IAAI;KACX,OAAO,OAAO,QAAQ;KACtB,gBAAgB,mBAAmB,WAAW,OAAO,CAAC;IACvD;IACA,SAAS;KACR,SAAS;KACT,UAAU;IACX;IACA,UAAU;KACT,cAAc;KACd,UAAU;KACV,UAAU;IACX;GACD,CAAC;EACF;EACA,cAAc;GACb,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM;IACpC,MAAM,KAAK,QAAQ,iBAAiB,OAAO,eAAe;IAC1D,MAAM,gBAAgB,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,qBAAqB,gBAAgB,QAAQ,aAAa;IAC5H,MAAM,iBAAiB;IACvB,OAAO,eAAe;KACrB,QAAQ;KACR,MAAM;MACL,OAAO,IAAI;MACX,OAAO,OAAO,QAAQ;MACtB,gBAAgB,gBAAgB,WAAW,OAAO,CAAC;MACnD,GAAG,kBAAkB,KAAK,IAAI,CAAC,IAAI,CAAC,aAAa;KAClD;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU;MACV,UAAU,GAAG,GAAG,GAAG,iBAAiB,kBAAkB,KAAK,IAAI,KAAK,aAAa;KAClF;IACD,CAAC;GACF;EACD;EACA,kBAAkB;GACjB,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM;IACpC,MAAM,kBAAkB,uBAAuB,oBAAoB,OAAO;IAC1E,MAAM,OAAO;IACb,OAAO,eAAe;KACrB,QAAQ;KACR,MAAM;MACL,OAAO,IAAI;MACX,OAAO,OAAO,QAAQ;MACtB,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;MACV,UAAU,GAAG,OAAO,oBAAoB,KAAK,IAAI,KAAK,aAAa;KACpE;IACD,CAAC;GACF;EACD;CACD;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"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-BzhBMCtK-D26JB2w3.mjs";
|
|
2
|
+
import { a as quoteQualifiedName, i as quoteIdentifier, n as isFullTextIndexableCodec, o as renderFullTextIndexExpression, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-9CdIjv89.mjs";
|
|
3
|
+
export { DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, escapeLiteral, isFullTextIndexableCodec, qualifyName, quoteIdentifier, quoteQualifiedName, renderFullTextIndexExpression, validateEnumValueLength };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-6j9YTLpr-BCyCBPBg.mjs";
|
|
2
|
-
|
|
2
|
+
import { a as renderFullTextIndexExpression, r as isFullTextIndexableCodec, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-B9_t3ep--DaX5ZABJ.mjs";
|
|
3
|
+
export { DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, escapeLiteral, isFullTextIndexableCodec, qualifyName, quoteIdentifier, quoteQualifiedName, renderFullTextIndexExpression, validateEnumValueLength };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { r as codecDescriptors } from "./codecs-7isLDrZp-DmbSAn6K.mjs";
|
|
2
|
+
import { r as quoteIdentifier } from "./sql-utils-6j9YTLpr-BCyCBPBg.mjs";
|
|
3
|
+
//#region ../../../3-targets/3-targets/postgres/dist/text-search-languages-B9_t3ep-.mjs
|
|
4
|
+
/**
|
|
5
|
+
* The index expression that covers `fullTextMatches`, `fullTextRank` and
|
|
6
|
+
* `fullTextHeadline` on a column. Postgres uses an expression index only when the
|
|
7
|
+
* indexed expression is the same `to_tsvector` over the same configuration literal and
|
|
8
|
+
* the same column as the query, so both the `@@fullTextIndex` attribute and the
|
|
9
|
+
* TypeScript helper render it here rather than each spelling it out.
|
|
10
|
+
*/
|
|
11
|
+
function renderFullTextIndexExpression(language, columnName) {
|
|
12
|
+
return `to_tsvector('${language}', ${quoteIdentifier(columnName)})`;
|
|
13
|
+
}
|
|
14
|
+
/** Widens a descriptor's trait tuple, so membership is a plain string test. */
|
|
15
|
+
function traitsOf(descriptor) {
|
|
16
|
+
return descriptor.traits;
|
|
17
|
+
}
|
|
18
|
+
const TEXTUAL_CODEC_IDS = new Set(codecDescriptors.filter((descriptor) => traitsOf(descriptor).includes("textual")).map((descriptor) => descriptor.codecId));
|
|
19
|
+
/**
|
|
20
|
+
* Whether a column stored through this codec can be indexed for full-text search.
|
|
21
|
+
* Read from the codec descriptors themselves, so both authoring surfaces accept
|
|
22
|
+
* exactly the columns the `textual` operations dispatch on.
|
|
23
|
+
*/
|
|
24
|
+
function isFullTextIndexableCodec(codecId) {
|
|
25
|
+
return TEXTUAL_CODEC_IDS.has(codecId);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The text-search configurations a stock PostgreSQL server ships with. The language reaches SQL as
|
|
29
|
+
* an inline literal rather than a bound parameter, so only names on this list may be used.
|
|
30
|
+
*/
|
|
31
|
+
const POSTGRES_TEXT_SEARCH_LANGUAGES = [
|
|
32
|
+
"simple",
|
|
33
|
+
"arabic",
|
|
34
|
+
"armenian",
|
|
35
|
+
"basque",
|
|
36
|
+
"catalan",
|
|
37
|
+
"danish",
|
|
38
|
+
"dutch",
|
|
39
|
+
"english",
|
|
40
|
+
"finnish",
|
|
41
|
+
"french",
|
|
42
|
+
"german",
|
|
43
|
+
"greek",
|
|
44
|
+
"hindi",
|
|
45
|
+
"hungarian",
|
|
46
|
+
"indonesian",
|
|
47
|
+
"irish",
|
|
48
|
+
"italian",
|
|
49
|
+
"lithuanian",
|
|
50
|
+
"nepali",
|
|
51
|
+
"norwegian",
|
|
52
|
+
"portuguese",
|
|
53
|
+
"romanian",
|
|
54
|
+
"russian",
|
|
55
|
+
"serbian",
|
|
56
|
+
"spanish",
|
|
57
|
+
"swedish",
|
|
58
|
+
"tamil",
|
|
59
|
+
"turkish",
|
|
60
|
+
"yiddish"
|
|
61
|
+
];
|
|
62
|
+
const DEFAULT_FULL_TEXT_SEARCH_LANGUAGE = "english";
|
|
63
|
+
const KNOWN_LANGUAGES = new Set(POSTGRES_TEXT_SEARCH_LANGUAGES);
|
|
64
|
+
function isFullTextSearchLanguage(language) {
|
|
65
|
+
return KNOWN_LANGUAGES.has(language);
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { renderFullTextIndexExpression as a, isFullTextSearchLanguage as i, POSTGRES_TEXT_SEARCH_LANGUAGES as n, isFullTextIndexableCodec as r, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE as t };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=text-search-languages-B9_t3ep--DaX5ZABJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-search-languages-B9_t3ep--DaX5ZABJ.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/text-search-languages-B9_t3ep-.mjs"],"sourcesContent":["import { t as codecDescriptors } from \"./codecs-7isLDrZp.mjs\";\nimport { r as quoteIdentifier } from \"./sql-utils-6j9YTLpr.mjs\";\n//#region src/core/full-text-index-expression.ts\n/**\n* The index expression that covers `fullTextMatches`, `fullTextRank` and\n* `fullTextHeadline` on a column. Postgres uses an expression index only when the\n* indexed expression is the same `to_tsvector` over the same configuration literal and\n* the same column as the query, so both the `@@fullTextIndex` attribute and the\n* TypeScript helper render it here rather than each spelling it out.\n*/\nfunction renderFullTextIndexExpression(language, columnName) {\n\treturn `to_tsvector('${language}', ${quoteIdentifier(columnName)})`;\n}\n/** Widens a descriptor's trait tuple, so membership is a plain string test. */\nfunction traitsOf(descriptor) {\n\treturn descriptor.traits;\n}\nconst TEXTUAL_CODEC_IDS = new Set(codecDescriptors.filter((descriptor) => traitsOf(descriptor).includes(\"textual\")).map((descriptor) => descriptor.codecId));\n/**\n* Whether a column stored through this codec can be indexed for full-text search.\n* Read from the codec descriptors themselves, so both authoring surfaces accept\n* exactly the columns the `textual` operations dispatch on.\n*/\nfunction isFullTextIndexableCodec(codecId) {\n\treturn TEXTUAL_CODEC_IDS.has(codecId);\n}\n//#endregion\n//#region src/core/text-search-languages.ts\n/**\n* The text-search configurations a stock PostgreSQL server ships with. The language reaches SQL as\n* an inline literal rather than a bound parameter, so only names on this list may be used.\n*/\nconst POSTGRES_TEXT_SEARCH_LANGUAGES = [\n\t\"simple\",\n\t\"arabic\",\n\t\"armenian\",\n\t\"basque\",\n\t\"catalan\",\n\t\"danish\",\n\t\"dutch\",\n\t\"english\",\n\t\"finnish\",\n\t\"french\",\n\t\"german\",\n\t\"greek\",\n\t\"hindi\",\n\t\"hungarian\",\n\t\"indonesian\",\n\t\"irish\",\n\t\"italian\",\n\t\"lithuanian\",\n\t\"nepali\",\n\t\"norwegian\",\n\t\"portuguese\",\n\t\"romanian\",\n\t\"russian\",\n\t\"serbian\",\n\t\"spanish\",\n\t\"swedish\",\n\t\"tamil\",\n\t\"turkish\",\n\t\"yiddish\"\n];\nconst DEFAULT_FULL_TEXT_SEARCH_LANGUAGE = \"english\";\nconst KNOWN_LANGUAGES = new Set(POSTGRES_TEXT_SEARCH_LANGUAGES);\nfunction isFullTextSearchLanguage(language) {\n\treturn KNOWN_LANGUAGES.has(language);\n}\n//#endregion\nexport { renderFullTextIndexExpression as a, isFullTextIndexableCodec as i, POSTGRES_TEXT_SEARCH_LANGUAGES as n, isFullTextSearchLanguage as r, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE as t };\n\n//# sourceMappingURL=text-search-languages-B9_t3ep-.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,8BAA8B,UAAU,YAAY;CAC5D,OAAO,gBAAgB,SAAS,KAAK,gBAAgB,UAAU,EAAE;AAClE;;AAEA,SAAS,SAAS,YAAY;CAC7B,OAAO,WAAW;AACnB;AACA,MAAM,oBAAoB,IAAI,IAAI,iBAAiB,QAAQ,eAAe,SAAS,UAAU,CAAC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,KAAK,eAAe,WAAW,OAAO,CAAC;;;;;;AAM3J,SAAS,yBAAyB,SAAS;CAC1C,OAAO,kBAAkB,IAAI,OAAO;AACrC;;;;;AAOA,MAAM,iCAAiC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA,MAAM,oCAAoC;AAC1C,MAAM,kBAAkB,IAAI,IAAI,8BAA8B;AAC9D,SAAS,yBAAyB,UAAU;CAC3C,OAAO,gBAAgB,IAAI,QAAQ;AACpC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region ../../../3-targets/3-targets/postgres/dist/text-search-languages-BzhBMCtK.d.mts
|
|
2
|
+
//#region src/core/text-search-languages.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The text-search configurations a stock PostgreSQL server ships with. The language reaches SQL as
|
|
5
|
+
* an inline literal rather than a bound parameter, so only names on this list may be used.
|
|
6
|
+
*/
|
|
7
|
+
declare const POSTGRES_TEXT_SEARCH_LANGUAGES: readonly ["simple", "arabic", "armenian", "basque", "catalan", "danish", "dutch", "english", "finnish", "french", "german", "greek", "hindi", "hungarian", "indonesian", "irish", "italian", "lithuanian", "nepali", "norwegian", "portuguese", "romanian", "russian", "serbian", "spanish", "swedish", "tamil", "turkish", "yiddish"];
|
|
8
|
+
type FullTextSearchLanguage = (typeof POSTGRES_TEXT_SEARCH_LANGUAGES)[number];
|
|
9
|
+
declare const DEFAULT_FULL_TEXT_SEARCH_LANGUAGE: FullTextSearchLanguage;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FullTextSearchLanguage as n, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE as t };
|
|
12
|
+
//# sourceMappingURL=text-search-languages-BzhBMCtK-D26JB2w3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-search-languages-BzhBMCtK-D26JB2w3.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/text-search-languages-BzhBMCtK.d.mts"],"mappings":";;;;;;cAKc;KACT,iCAAiC;cACxB,mCAAmC"}
|