@prisma/orm-target-postgres 8.0.0-rc.18-dev.4 → 8.0.0-rc.18-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- import { a as TsqueryExpression, o as TsqueryParserOptions } from "./full-text-parsers-B_aFtL8u-BTbiMXi1.mjs";
1
+ import { d as TsqueryParserOptions, u as TsqueryExpression } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
2
+ import "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
2
3
  //#region ../../../3-targets/3-targets/postgres/dist/full-text.d.mts
3
4
  //#region src/core/tsquery-tag.d.ts
4
5
  type TsqueryTag = (strings: TemplateStringsArray, ...values: string[]) => TsqueryExpression;
@@ -22,4 +23,4 @@ declare function tsquery(options: TsqueryParserOptions): TsqueryTag;
22
23
  declare function tsquery(strings: TemplateStringsArray, ...values: string[]): TsqueryExpression;
23
24
  //#endregion
24
25
  export { tsquery as n, TsqueryTag as t };
25
- //# sourceMappingURL=full-text-Dg6-SYSP.d.mts.map
26
+ //# sourceMappingURL=full-text-Li_RyodV.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"full-text-Li_RyodV.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text.d.mts"],"mappings":";;;;KAGK,cAAc,SAAS,yBAAyB,qBAAqB;;;;;;;;;;;;;;;;;iBAiBzD,QAAQ,SAAS,uBAAuB;iBACxC,QAAQ,SAAS,yBAAyB,mBAAmB"}
@@ -0,0 +1,27 @@
1
+ import { t as FULL_TEXT_INDEX_TYPE } from "./full-text-index-definition-CwWV12H4-DNafWNux.mjs";
2
+ import { n as Resolve, t as ExtractedCodecTypes } from "./codec-type-map-DueQFJ3a-DKLtMn3R.mjs";
3
+ import { l as TsqueryArgument } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
4
+ import { UniqueIndexNamesOfType } from "@prisma/orm-family-sql/relational-core/index-reference";
5
+ import { CollectionMethodContributionType, CollectionMethodModelType } from "@prisma/orm-family-sql/relational-core/collection-methods";
6
+ //#region ../../../3-targets/3-targets/postgres/dist/full-text-collection-method-DtXutLv6.d.mts
7
+ //#region src/core/full-text-collection-method.d.ts
8
+ /** A `tsquery` expression from a parser or the `tsquery` tag, or a `tsquery` value read back from a query. */
9
+ type PostgresTsqueryArgument = TsqueryArgument<Resolve<ExtractedCodecTypes>>;
10
+ interface FullTextSearchSignature {
11
+ readonly parameters: readonly [query: PostgresTsqueryArgument];
12
+ readonly filters: true;
13
+ readonly orders: true;
14
+ }
15
+ type FullTextMethodTable<Model extends CollectionMethodModelType> = Model['target'] extends 'postgres' ? { readonly [Name in UniqueIndexNamesOfType<Model['table']['indexes'][number], typeof FULL_TEXT_INDEX_TYPE>]: FullTextSearchSignature; } : Record<never, never>;
16
+ /** One method for each full-text index of a Postgres model, named after the index: `using.<index>(query)` filters to the rows that match `query`, most relevant first. */
17
+ interface PostgresFullTextMethods extends CollectionMethodContributionType {
18
+ readonly methods: FullTextMethodTable<this['model']>;
19
+ }
20
+ declare module '@prisma/orm-family-sql/relational-core/collection-methods' {
21
+ interface CollectionMethodRegistry {
22
+ readonly 'postgres/fullText': PostgresFullTextMethods;
23
+ }
24
+ }
25
+ //#endregion
26
+ export { PostgresTsqueryArgument as n, PostgresFullTextMethods as t };
27
+ //# sourceMappingURL=full-text-collection-method-DtXutLv6-DEBX-ltM.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"full-text-collection-method-DtXutLv6-DEBX-ltM.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-collection-method-DtXutLv6.d.mts"],"mappings":";;;;;;;;KAOK,0BAA0B,gBAAgB,QAAQ;UAC7C;WACC,sBAAsB,OAAO;WAC7B;WACA;;KAEN,oBAAoB,cAAc,6BAA6B,iDAAiD,QAAQ,uBAAuB,0CAA0C,wBAAwB,6BAA6B;;UAEzO,gCAAgC;WAC/B,SAAS;;;YAGR;aACC,qBAAqB"}
@@ -1,9 +1,37 @@
1
+ import { j as PG_TSQUERY_CODEC_ID } from "./codec-ids-jWpRZjZo-BKIzyx-J.mjs";
1
2
  import { i as FullTextWeightGroups, r as FullTextSearchLanguage } from "./text-search-languages-CO6775ih-DMYr9qsC.mjs";
2
3
  import { t as FULL_TEXT_INDEX_TYPE } from "./full-text-index-definition-CwWV12H4-DNafWNux.mjs";
3
- import { d as websearchToTsquery, t as FullTextDocument } from "./full-text-parsers-B_aFtL8u-BTbiMXi1.mjs";
4
+ import { t as ExtractedCodecTypes } from "./codec-type-map-DueQFJ3a-DKLtMn3R.mjs";
4
5
  import { SqlQueryOperationTypes } from "@prisma/orm-family-sql/contract/types";
5
6
  import { CodecExpression, Expression, TraitExpression } from "@prisma/orm-family-sql/relational-core/expression";
6
- //#region ../../../3-targets/3-targets/postgres/dist/operation-types.d.mts
7
+ //#region ../../../3-targets/3-targets/postgres/dist/operation-types-C4VAniFe.d.mts
8
+ //#region src/core/full-text-document.d.ts
9
+ /** A textual column, nullable or not, as an expression rather than a value. */
10
+ type FullTextDocumentColumn = Extract<TraitExpression<readonly ['textual'], boolean, ExtractedCodecTypes>, {
11
+ buildAst(): unknown;
12
+ }>;
13
+ /**
14
+ * The weight groups of a search document: each item is one group, strongest first, either one
15
+ * column or a list of columns.
16
+ */
17
+ type FullTextDocumentGroups = readonly (FullTextDocumentColumn | readonly FullTextDocumentColumn[])[];
18
+ /**
19
+ * A search document built from columns in weight groups, for `fullTextMatches` and `fullTextRank`
20
+ * to search without a full-text index. Postgres uses an index only for a query over the same
21
+ * document, so to search an index, pass the index from the table's `indexes` instead.
22
+ */
23
+ declare class FullTextDocument {
24
+ readonly weightGroups: FullTextWeightGroups<FullTextDocumentColumn>;
25
+ private constructor();
26
+ static of(groups: FullTextDocumentGroups): FullTextDocument;
27
+ }
28
+ /**
29
+ * The search document of columns in weight groups, strongest first: `fullTextDocument([[f.title,
30
+ * f.subtitle], [f.body]])`. Each group takes the next weight, `A` to `D`; a column named twice is
31
+ * not refused, because column expressions have no name to compare.
32
+ */
33
+ declare function fullTextDocument(groups: FullTextDocumentGroups): FullTextDocument;
34
+ //#endregion
7
35
  //#region src/core/full-text-options.d.ts
8
36
  interface FullTextMatchesOptions {
9
37
  /**
@@ -32,6 +60,33 @@ interface FullTextHeadlineOptions extends FullTextMatchesOptions {
32
60
  readonly highlightAll?: boolean;
33
61
  }
34
62
  //#endregion
63
+ //#region src/core/full-text-parsers.d.ts
64
+ interface TsqueryParserOptions {
65
+ /** Text-search configuration the parser normalizes the words with. Defaults to `english`. */
66
+ readonly language?: FullTextSearchLanguage;
67
+ }
68
+ type TsqueryExpression = Expression<{
69
+ codecId: typeof PG_TSQUERY_CODEC_ID;
70
+ nullable: false;
71
+ }>;
72
+ /**
73
+ * What a parser parses: a string, bound as `text`, or a non-null expression whose codec is one of
74
+ * this target's `textual` codecs, such as a `text` or `varchar` column.
75
+ */
76
+ type TextArgument = TraitExpression<readonly ['textual'], false, ExtractedCodecTypes>;
77
+ /** Postgres `websearch_to_tsquery`: search-box syntax with quotes, `or` and `-`. Never errors. */
78
+ declare const websearchToTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
79
+ /**
80
+ * Postgres `to_tsquery`: operator syntax (`'zebra' & !'graze'`, `zeb:*`), each word normalized.
81
+ * Malformed input fails at execution, so pass only text the application wrote, never user input;
82
+ * `tsquery` interpolates user input safely.
83
+ */
84
+ declare const toTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
85
+ /** Postgres `plainto_tsquery`: every word must match. */
86
+ declare const plaintoTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
87
+ /** Postgres `phraseto_tsquery`: the words must match in order. */
88
+ declare const phrasetoTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
89
+ //#endregion
35
90
  //#region src/types/operation-types.d.ts
36
91
  type CodecTypesBase = Record<string, {
37
92
  readonly input: unknown;
@@ -128,5 +183,5 @@ type QueryOperationTypes<CT extends CodecTypesBase> = SqlQueryOperationTypes<CT,
128
183
  readonly phrasetoTsquery: TsqueryParser;
129
184
  }>;
130
185
  //#endregion
131
- export { TsqueryArgument as a, QueryOperationTypes as i, FullTextMatchesOptions as n, FullTextRankOptions as r, FullTextHeadlineOptions as t };
132
- //# sourceMappingURL=operation-types-llBeWQxy.d.mts.map
186
+ export { FullTextMatchesOptions as a, TextArgument as c, TsqueryParserOptions as d, fullTextDocument as f, websearchToTsquery as g, toTsquery as h, FullTextHeadlineOptions as i, TsqueryArgument as l, plaintoTsquery as m, FullTextDocumentColumn as n, FullTextRankOptions as o, phrasetoTsquery as p, FullTextDocumentGroups as r, QueryOperationTypes as s, FullTextDocument as t, TsqueryExpression as u };
187
+ //# sourceMappingURL=operation-types-C4VAniFe-D2eX0-ZZ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-types-C4VAniFe-D2eX0-ZZ.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/operation-types-C4VAniFe.d.mts"],"mappings":";;;;;;;;;KASK,yBAAyB,QAAQ,+CAA+C;EACnF;;;;;;KAMG,mCAAmC,kCAAkC;;;;;;cAM5D;WACH,cAAc,qBAAqB;UACpC;SACD,GAAG,QAAQ,yBAAyB;;;;;;;iBAO5B,iBAAiB,QAAQ,yBAAyB;;;UAGzD;;;;;;WAMC,WAAW;;UAEZ,4BAA4B;;WAE3B;;WAEA;;UAED,gCAAgC;;WAE/B;;WAEA;;WAEA;;WAEA;;WAEA;;;;UAID;;WAEC,WAAW;;KAEjB,oBAAoB;EACvB,gBAAgB;EAChB;;;;;;KAMG,eAAe,6CAA6C;;cAEnD,qBAAqB,MAAM,cAAc,UAAU,yBAAyB;;;;;;cAM5E,YAAY,MAAM,cAAc,UAAU,yBAAyB;;cAEnE,iBAAiB,MAAM,cAAc,UAAU,yBAAyB;;cAExE,kBAAkB,MAAM,cAAc,UAAU,yBAAyB;;;KAGlF,iBAAiB;WACX;WACA;;KAEN;WACM;;KAEN,YAAY,WAAW,kBAAkB,6CAA6C;KACtF,YAAY,WAAW,kBAAkB,oCAAoC;;KAE7E,eAAe,WAAW,kBAAkB,QAAQ,+CAA+C;EACtG;;;;;;UAMQ,uBAAuB,WAAW;WACjC,aAAa;WACb;aACE,cAAc;aACd,UAAU;;WAEZ,SAAS,SAAS,eAAe,eAAe;;;KAGtD,gBAAgB,WAAW,KAAK;WAC1B;;;;;;;KAON,gBAAgB,WAAW,kBAAkB,uCAAuC;KACpF;WACM,aAAa;;KAEnB,oBAAoB,WAAW,kBAAkB,uBAAuB;WAClE;aACE,MAAM;aACN,OAAO,MAAM,YAAY,KAAK,SAAS,YAAY,QAAQ;MAClE;MACA;;;;;;;;WAQK;aACE,MAAM;aACN;OACN,OAAO,uBAAuB,KAAK,OAAO,gBAAgB,KAAK,UAAU,gBAAgB,0BAA0B;QAClH;QACA;;OAED,UAAU,YAAY,MAAM,kBAAkB,OAAO,gBAAgB,KAAK,UAAU,yBAAyB;QAC5G;QACA;;;;;;;;;WASG;aACE,MAAM;aACN;OACN,OAAO,uBAAuB,KAAK,OAAO,gBAAgB,KAAK,UAAU,gBAAgB,uBAAuB;QAC/G;QACA;;OAED,UAAU,YAAY,MAAM,kBAAkB,OAAO,gBAAgB,KAAK,UAAU,sBAAsB;QACzG;QACA;;;;WAIG;aACE,MAAM;aACN,OAAO,MAAM,YAAY,KAAK,OAAO,gBAAgB,KAAK,UAAU,4BAA4B;MACvG;MACA;;;WAGK,oBAAoB;WACpB,WAAW;WACX,gBAAgB;WAChB,iBAAiB"}
@@ -0,0 +1 @@
1
+ import "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
@@ -1,4 +1,5 @@
1
1
  import "./plain-date-time-now-generator-BmOTu5Au-BPhXjp4T.mjs";
2
+ import "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
2
3
  import "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
3
4
  import { AnyCodecDescriptor } from "@prisma/orm-framework/components/codec";
4
5
  import { AnyEntityKindDescriptor, Namespace } from "@prisma/orm-framework/components/ir";
@@ -6,6 +7,7 @@ import { SqlNamespaceInput, SqlStorage } from "@prisma/orm-family-sql/contract/t
6
7
  import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
7
8
  import { Contract } from "@prisma/orm-framework/contract/types";
8
9
  import { RuntimeTargetDescriptor, RuntimeTargetInstance } from "@prisma/orm-framework/components/execution";
10
+ import { CollectionMethodContribution } from "@prisma/orm-family-sql/relational-core/collection-methods";
9
11
  import { SqlOperationDescriptors } from "@prisma/orm-family-sql/operations";
10
12
  import { PreserveEmptyPredicate } from "@prisma/orm-framework/contract/hashing";
11
13
  import { JsonObject } from "@prisma/orm-framework/utils/json";
@@ -31,7 +33,8 @@ declare const postgresRuntimeTargetDescriptor: RuntimeTargetDescriptor<'sql', 'p
31
33
  readonly codecs: () => readonly AnyCodecDescriptor[];
32
34
  readonly listDecoder: () => PostgresListDecoder;
33
35
  readonly queryOperations: () => SqlOperationDescriptors;
36
+ readonly collectionMethods: () => readonly CollectionMethodContribution[];
34
37
  };
35
38
  //#endregion
36
39
  export { postgresRuntimeTargetDescriptor as i, PostgresListDecoder as n, PostgresRuntimeTargetInstance as r, PostgresContractSerializer as t };
37
- //# sourceMappingURL=runtime-DAJXp26i.d.mts.map
40
+ //# sourceMappingURL=runtime-qn4hL1wO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-qn4hL1wO.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;cAec,mCAAmC,0BAA0B,SAAS;EAClF,qBAAqB;EACrB,YAAY,gCAAgC;YAClC,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,sCAAsC;KAC3C,uBAAuB,oBAAoB,gBAAgB,mBAAmB,qBAAqB;;;;;;;cAO1F,iCAAiC,2CAA2C;WAC/E,uBAAuB;WACvB,mBAAmB;WACnB,uBAAuB;WACvB,kCAAkC"}
package/dist/target.d.mts CHANGED
@@ -33,8 +33,9 @@ import "./data-transform-C-3UJ3hC.mjs";
33
33
  import { A as pgTimestamptz, C as pgPrecisionParams, D as pgTimeCanonical, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, N as pgTimetzCanonical, O as pgTimestamp, P as pgTsquery, R as postgresDataTypeEntries, S as pgNumericParams, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptzCanonical, k as pgTimestampCanonical, l as pgDateCanonical, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, t as createPostgresBuiltinDataTypeLookup, u as pgEnum, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson, z as postgresDataTypes } from "./data-types-BDkZIUMI.mjs";
34
34
  import { t as buildPostgresPlanDiff } from "./diff-database-schema-BGcRo8FM.mjs";
35
35
  import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-D5sJ0fgp.mjs";
36
- import { a as TsqueryExpression, c as phrasetoTsquery, d as websearchToTsquery, i as TextArgument, l as plaintoTsquery, n as FullTextDocumentColumn, o as TsqueryParserOptions, r as FullTextDocumentGroups, s as fullTextDocument, t as FullTextDocument, u as toTsquery } from "./full-text-parsers-B_aFtL8u-BTbiMXi1.mjs";
37
- import { n as tsquery, t as TsqueryTag } from "./full-text-Dg6-SYSP.mjs";
36
+ import { a as FullTextMatchesOptions, c as TextArgument, d as TsqueryParserOptions, f as fullTextDocument, g as websearchToTsquery, h as toTsquery, i as FullTextHeadlineOptions, l as TsqueryArgument, m as plaintoTsquery, n as FullTextDocumentColumn, o as FullTextRankOptions, p as phrasetoTsquery, r as FullTextDocumentGroups, s as QueryOperationTypes, t as FullTextDocument, u as TsqueryExpression } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
37
+ import { n as PostgresTsqueryArgument, t as PostgresFullTextMethods } from "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
38
+ import { n as tsquery, t as TsqueryTag } from "./full-text-Li_RyodV.mjs";
38
39
  import { t as postgresCodecTraitsOf } from "./full-text-index-authoring-Ca6bWXyG.mjs";
39
40
  import { A as RenameColumnCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetDefaultCall, I as SetNotNullCall, M as RenameIndexCall, N as RenamePostgresRlsPolicyCall, P as RenameTableCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameConstraintCall, k as RawSqlCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DkaMatJ4-D_7fWo-v.mjs";
40
41
  import { n as planIssues, t as coalesceSubtreeIssues } from "./issue-planner-BiJDKtW5.mjs";
@@ -43,7 +44,7 @@ import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2f
43
44
  import { t as PostgresMigration } from "./postgres-migration-D5OiThXV-CihIARAE.mjs";
44
45
  import { a as fn, c as placeholder, d as sql, f 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-NJo7cPpB.mjs";
45
46
  import "./op-factory-call-LGCmMtZM.mjs";
46
- import { a as TsqueryArgument, i as QueryOperationTypes, n as FullTextMatchesOptions, r as FullTextRankOptions, t as FullTextHeadlineOptions } from "./operation-types-llBeWQxy.mjs";
47
+ import "./operation-types-ChXH8kV_.mjs";
47
48
  import "./pack-BOVET-UW.mjs";
48
49
  import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-MoopN05f-CfmsQNwj.mjs";
49
50
  import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-Xei8enE-.mjs";
@@ -55,6 +56,6 @@ import { i as stackDataTypes, n as buildExpectedFormatType, r as qualifyTableNam
55
56
  import { t as prisma7PostgresBinding } from "./prisma7-binding-BQ5VOUjh.mjs";
56
57
  import { t as renderOps } from "./render-ops-DPwhZt2W.mjs";
57
58
  import { t as renderCallsToTypeScript } from "./render-typescript-6sCFvMBh.mjs";
58
- import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-DAJXp26i.mjs";
59
+ import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-qn4hL1wO.mjs";
59
60
  import { t as resolveDdlSchemaForNamespaceStorage } from "./schema-ir-annotations-DuuYh0gl.mjs";
60
- export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, type CatalogColumnType, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, type CreateIndexElements, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, type DefaultColumn, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, FULL_TEXT_INDEX_TYPE, type FullTextColumnCodecs, FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type FullTextFieldsInput, type FullTextHeadlineOptions, type FullTextIndexCandidate, type FullTextIndexDefinition, type FullTextIndexProblem, type FullTextMatchesOptions, type FullTextRankOptions, type FullTextSearchLanguage, INSTANT_NOW_GENERATOR_ID, type IndexExistsCheckBuilder, Interval, type IntrospectedNativeType, type JsonValue$1 as JsonValue, MARKER_LOCK_KEY, MARKER_LOCK_SQL, 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_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, 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 PostgresCodecRegistry, 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, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, 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, type TextArgument, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, type TsqueryArgument, type TsqueryExpression, type TsqueryParserOptions, type TsqueryTag, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, alterTable, alterTypeCheckText, 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, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
61
+ export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, type CatalogColumnType, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, type CreateIndexElements, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, type DefaultColumn, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, FULL_TEXT_INDEX_TYPE, type FullTextColumnCodecs, FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type FullTextFieldsInput, type FullTextHeadlineOptions, type FullTextIndexCandidate, type FullTextIndexDefinition, type FullTextIndexProblem, type FullTextMatchesOptions, type FullTextRankOptions, type FullTextSearchLanguage, INSTANT_NOW_GENERATOR_ID, type IndexExistsCheckBuilder, Interval, type IntrospectedNativeType, type JsonValue$1 as JsonValue, MARKER_LOCK_KEY, MARKER_LOCK_SQL, 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_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, 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 PostgresCodecRegistry, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, type PostgresFullTextMethods, 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, type PostgresTsqueryArgument, PostgresUnboundSchema, type QueryOperationTypes, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, 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, type TextArgument, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, type TsqueryArgument, type TsqueryExpression, type TsqueryParserOptions, type TsqueryTag, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, alterTable, alterTypeCheckText, 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, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
@@ -1,3 +1,4 @@
1
- import { a as TsqueryExpression, c as phrasetoTsquery, d as websearchToTsquery, i as TextArgument, l as plaintoTsquery, n as FullTextDocumentColumn, o as TsqueryParserOptions, r as FullTextDocumentGroups, s as fullTextDocument, t as FullTextDocument, u as toTsquery } from "./full-text-parsers-B_aFtL8u-BTbiMXi1.mjs";
2
- import { n as tsquery, t as TsqueryTag } from "./full-text-Dg6-SYSP.mjs";
3
- export { FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type TextArgument, type TsqueryExpression, type TsqueryParserOptions, type TsqueryTag, fullTextDocument, phrasetoTsquery, plaintoTsquery, toTsquery, tsquery, websearchToTsquery };
1
+ import { c as TextArgument, d as TsqueryParserOptions, f as fullTextDocument, g as websearchToTsquery, h as toTsquery, m as plaintoTsquery, n as FullTextDocumentColumn, p as phrasetoTsquery, r as FullTextDocumentGroups, t as FullTextDocument, u as TsqueryExpression } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
2
+ import { n as PostgresTsqueryArgument, t as PostgresFullTextMethods } from "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
3
+ import { n as tsquery, t as TsqueryTag } from "./full-text-Li_RyodV.mjs";
4
+ export { FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type PostgresFullTextMethods, type PostgresTsqueryArgument, type TextArgument, type TsqueryExpression, type TsqueryParserOptions, type TsqueryTag, fullTextDocument, phrasetoTsquery, plaintoTsquery, toTsquery, tsquery, websearchToTsquery };
@@ -1,3 +1,4 @@
1
1
  import { r as FullTextSearchLanguage } from "./text-search-languages-CO6775ih-DMYr9qsC.mjs";
2
- import { a as TsqueryArgument, i as QueryOperationTypes, n as FullTextMatchesOptions, r as FullTextRankOptions, t as FullTextHeadlineOptions } from "./operation-types-llBeWQxy.mjs";
2
+ import { a as FullTextMatchesOptions, i as FullTextHeadlineOptions, l as TsqueryArgument, o as FullTextRankOptions, s as QueryOperationTypes } from "./operation-types-C4VAniFe-D2eX0-ZZ.mjs";
3
+ import "./operation-types-ChXH8kV_.mjs";
3
4
  export type { FullTextHeadlineOptions, FullTextMatchesOptions, FullTextRankOptions, FullTextSearchLanguage, QueryOperationTypes, TsqueryArgument };
@@ -1,5 +1,6 @@
1
1
  import { t as decodePostgresListText } from "./list-decoder-BcrLExnx-hTa7qY7a.mjs";
2
2
  import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./plain-date-time-now-generator-BmOTu5Au-BPhXjp4T.mjs";
3
+ import { t as PostgresFullTextMethods } from "./full-text-collection-method-DtXutLv6-DEBX-ltM.mjs";
3
4
  import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
4
- import { i as postgresRuntimeTargetDescriptor, n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-DAJXp26i.mjs";
5
- export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, PostgresListDecoder, PostgresRuntimeTargetInstance, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };
5
+ import { i as postgresRuntimeTargetDescriptor, n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-qn4hL1wO.mjs";
6
+ export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, type PostgresFullTextMethods, PostgresListDecoder, PostgresRuntimeTargetInstance, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };
@@ -1,16 +1,29 @@
1
1
  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--e0P2rfI.mjs";
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
- import { c as fullTextIndexOptions } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
4
+ import { c as fullTextIndexOptions, n as FULL_TEXT_INDEX_TYPE } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
5
5
  import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CTn87jlt-VHX7hiNU.mjs";
6
6
  import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-D4a-hsd_-B_YkwgHQ.mjs";
7
7
  import { t as renderFullTextDocument } from "./full-text-search-document-DYNz29YC-CfVTPwIL.mjs";
8
8
  import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-3yxlqPfK-CRFLsRHu.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
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
10
11
  import { type } from "arktype";
11
12
  import { assertDefined } from "@prisma/orm-framework/utils/assertions";
12
13
  import { buildOperation, isExpression, toExpr } from "@prisma/orm-family-sql/relational-core/expression";
14
+ import { uniqueIndexNamesOfType } from "@prisma/orm-family-sql/relational-core/index-reference";
13
15
  //#region ../../../3-targets/3-targets/postgres/dist/runtime.mjs
16
+ function indexFunction(tools, name) {
17
+ return blindCast(tools.fns[name]);
18
+ }
19
+ function fullTextMethod(indexName) {
20
+ return (collection, ...args) => collection.where((_model, tools) => indexFunction(tools, "fullTextMatches")(tools.indexes[indexName], ...args)).orderBy((_model, tools) => indexFunction(tools, "fullTextRank")(tools.indexes[indexName], ...args).desc());
21
+ }
22
+ /** The run-time half of `PostgresFullTextMethods`. */
23
+ const postgresFullTextMethods = {
24
+ id: "postgres/fullText",
25
+ methodsFor: (model) => Object.fromEntries(uniqueIndexNamesOfType(model.table.indexes, FULL_TEXT_INDEX_TYPE).map((name) => [name, fullTextMethod(name)]))
26
+ };
14
27
  const TEXT_REF = { codecId: PG_TEXT_CODEC_ID };
15
28
  const TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };
16
29
  const languageOf = (options) => options.language ?? "english";
@@ -185,6 +198,7 @@ const postgresRuntimeTargetDescriptor = {
185
198
  codecs: () => [],
186
199
  listDecoder: () => decodePostgresListText,
187
200
  queryOperations: () => postgresQueryOperations(),
201
+ collectionMethods: () => [postgresFullTextMethods],
188
202
  create() {
189
203
  return {
190
204
  familyId: "sql",
@@ -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-CTn87jlt.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-D4a-hsd_.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-DYNz29YC.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-3yxlqPfK.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,aAA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BAAuB,oBAAoB,OAAO;IAC1E,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"}
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, t as FULL_TEXT_INDEX_TYPE } 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-CTn87jlt.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-D4a-hsd_.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-DYNz29YC.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-3yxlqPfK.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 { blindCast } from \"@internal/utils/casts\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { uniqueIndexNamesOfType } from \"@internal/sql-relational-core/index-reference\";\n//#region src/core/full-text-collection-method.ts\nfunction indexFunction(tools, name) {\n\treturn blindCast(tools.fns[name]);\n}\nfunction fullTextMethod(indexName) {\n\treturn (collection, ...args) => collection.where((_model, tools) => indexFunction(tools, \"fullTextMatches\")(tools.indexes[indexName], ...args)).orderBy((_model, tools) => indexFunction(tools, \"fullTextRank\")(tools.indexes[indexName], ...args).desc());\n}\n/** The run-time half of `PostgresFullTextMethods`. */\nconst postgresFullTextMethods = {\n\tid: \"postgres/fullText\",\n\tmethodsFor: (model) => Object.fromEntries(uniqueIndexNamesOfType(model.table.indexes, FULL_TEXT_INDEX_TYPE).map((name) => [name, fullTextMethod(name)]))\n};\n//#endregion\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\tcollectionMethods: () => [postgresFullTextMethods],\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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SAAS;MACT,OAAO,OAAO,WAAW;MACzB,GAAG;MACH,GAAG,SAAS;KACb;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU,GAAG,GAAG,GAAG,SAAS,SAAS,YAAY,kBAAkB,KAAK,IAAI,KAAK,aAAa;KAC/F;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,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,yBAAyB,CAAC,uBAAuB;CACjD,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.18-dev.4",
3
+ "version": "8.0.0-rc.18-dev.5",
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.18-dev.4",
13
- "@prisma/orm-framework": "8.0.0-rc.18-dev.4",
14
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.4",
12
+ "@prisma/orm-family-sql": "8.0.0-rc.18-dev.5",
13
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.5",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.5",
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.18-dev.4",
26
- "@internal/driver-postgres": "8.0.0-rc.18-dev.4",
27
- "@internal/target-postgres": "8.0.0-rc.18-dev.4",
28
- "@repo/tsconfig": "8.0.0-rc.18-dev.4",
29
- "@repo/tsdown": "8.0.0-rc.18-dev.4",
25
+ "@internal/adapter-postgres": "8.0.0-rc.18-dev.5",
26
+ "@internal/driver-postgres": "8.0.0-rc.18-dev.5",
27
+ "@internal/target-postgres": "8.0.0-rc.18-dev.5",
28
+ "@repo/tsconfig": "8.0.0-rc.18-dev.5",
29
+ "@repo/tsdown": "8.0.0-rc.18-dev.5",
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":"full-text-Dg6-SYSP.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text.d.mts"],"mappings":";;;KAEK,cAAc,SAAS,yBAAyB,qBAAqB;;;;;;;;;;;;;;;;;iBAiBzD,QAAQ,SAAS,uBAAuB;iBACxC,QAAQ,SAAS,yBAAyB,mBAAmB"}
@@ -1,61 +0,0 @@
1
- import { j as PG_TSQUERY_CODEC_ID } from "./codec-ids-jWpRZjZo-BKIzyx-J.mjs";
2
- import { i as FullTextWeightGroups, r as FullTextSearchLanguage } from "./text-search-languages-CO6775ih-DMYr9qsC.mjs";
3
- import { t as ExtractedCodecTypes } from "./codec-type-map-DueQFJ3a-DKLtMn3R.mjs";
4
- import { Expression, TraitExpression } from "@prisma/orm-family-sql/relational-core/expression";
5
- //#region ../../../3-targets/3-targets/postgres/dist/full-text-parsers-B_aFtL8u.d.mts
6
- //#region src/core/full-text-document.d.ts
7
- /** A textual column, nullable or not, as an expression rather than a value. */
8
- type FullTextDocumentColumn = Extract<TraitExpression<readonly ['textual'], boolean, ExtractedCodecTypes>, {
9
- buildAst(): unknown;
10
- }>;
11
- /**
12
- * The weight groups of a search document: each item is one group, strongest first, either one
13
- * column or a list of columns.
14
- */
15
- type FullTextDocumentGroups = readonly (FullTextDocumentColumn | readonly FullTextDocumentColumn[])[];
16
- /**
17
- * A search document built from columns in weight groups, for `fullTextMatches` and `fullTextRank`
18
- * to search without a full-text index. Postgres uses an index only for a query over the same
19
- * document, so to search an index, pass the index from the table's `indexes` instead.
20
- */
21
- declare class FullTextDocument {
22
- readonly weightGroups: FullTextWeightGroups<FullTextDocumentColumn>;
23
- private constructor();
24
- static of(groups: FullTextDocumentGroups): FullTextDocument;
25
- }
26
- /**
27
- * The search document of columns in weight groups, strongest first: `fullTextDocument([[f.title,
28
- * f.subtitle], [f.body]])`. Each group takes the next weight, `A` to `D`; a column named twice is
29
- * not refused, because column expressions have no name to compare.
30
- */
31
- declare function fullTextDocument(groups: FullTextDocumentGroups): FullTextDocument;
32
- //#endregion
33
- //#region src/core/full-text-parsers.d.ts
34
- interface TsqueryParserOptions {
35
- /** Text-search configuration the parser normalizes the words with. Defaults to `english`. */
36
- readonly language?: FullTextSearchLanguage;
37
- }
38
- type TsqueryExpression = Expression<{
39
- codecId: typeof PG_TSQUERY_CODEC_ID;
40
- nullable: false;
41
- }>;
42
- /**
43
- * What a parser parses: a string, bound as `text`, or a non-null expression whose codec is one of
44
- * this target's `textual` codecs, such as a `text` or `varchar` column.
45
- */
46
- type TextArgument = TraitExpression<readonly ['textual'], false, ExtractedCodecTypes>;
47
- /** Postgres `websearch_to_tsquery`: search-box syntax with quotes, `or` and `-`. Never errors. */
48
- declare const websearchToTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
49
- /**
50
- * Postgres `to_tsquery`: operator syntax (`'zebra' & !'graze'`, `zeb:*`), each word normalized.
51
- * Malformed input fails at execution, so pass only text the application wrote, never user input;
52
- * `tsquery` interpolates user input safely.
53
- */
54
- declare const toTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
55
- /** Postgres `plainto_tsquery`: every word must match. */
56
- declare const plaintoTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
57
- /** Postgres `phraseto_tsquery`: the words must match in order. */
58
- declare const phrasetoTsquery: (text: TextArgument, options?: TsqueryParserOptions) => TsqueryExpression;
59
- //#endregion
60
- export { TsqueryExpression as a, phrasetoTsquery as c, websearchToTsquery as d, TextArgument as i, plaintoTsquery as l, FullTextDocumentColumn as n, TsqueryParserOptions as o, FullTextDocumentGroups as r, fullTextDocument as s, FullTextDocument as t, toTsquery as u };
61
- //# sourceMappingURL=full-text-parsers-B_aFtL8u-BTbiMXi1.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"full-text-parsers-B_aFtL8u-BTbiMXi1.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-parsers-B_aFtL8u.d.mts"],"mappings":";;;;;;;KAMK,yBAAyB,QAAQ,+CAA+C;EACnF;;;;;;KAMG,mCAAmC,kCAAkC;;;;;;cAM5D;WACH,cAAc,qBAAqB;UACpC;SACD,GAAG,QAAQ,yBAAyB;;;;;;;iBAO5B,iBAAiB,QAAQ,yBAAyB;;;UAGzD;;WAEC,WAAW;;KAEjB,oBAAoB;EACvB,gBAAgB;EAChB;;;;;;KAMG,eAAe,6CAA6C;;cAEnD,qBAAqB,MAAM,cAAc,UAAU,yBAAyB;;;;;;cAM5E,YAAY,MAAM,cAAc,UAAU,yBAAyB;;cAEnE,iBAAiB,MAAM,cAAc,UAAU,yBAAyB;;cAExE,kBAAkB,MAAM,cAAc,UAAU,yBAAyB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-types-llBeWQxy.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/operation-types.d.mts"],"mappings":";;;;;;;UAOU;;;;;;WAMC,WAAW;;UAEZ,4BAA4B;;WAE3B;;WAEA;;UAED,gCAAgC;;WAE/B;;WAEA;;WAEA;;WAEA;;WAEA;;;;KAIN,iBAAiB;WACX;WACA;;KAEN;WACM;;KAEN,YAAY,WAAW,kBAAkB,6CAA6C;KACtF,YAAY,WAAW,kBAAkB,oCAAoC;;KAE7E,eAAe,WAAW,kBAAkB,QAAQ,+CAA+C;EACtG;;;;;;UAMQ,uBAAuB,WAAW;WACjC,aAAa;WACb;aACE,cAAc;aACd,UAAU;;WAEZ,SAAS,SAAS,eAAe,eAAe;;;KAGtD,gBAAgB,WAAW,KAAK;WAC1B;;;;;;;KAON,gBAAgB,WAAW,kBAAkB,uCAAuC;KACpF;WACM,aAAa;;KAEnB,oBAAoB,WAAW,kBAAkB,uBAAuB;WAClE;aACE,MAAM;aACN,OAAO,MAAM,YAAY,KAAK,SAAS,YAAY,QAAQ;MAClE;MACA;;;;;;;;WAQK;aACE,MAAM;aACN;OACN,OAAO,uBAAuB,KAAK,OAAO,gBAAgB,KAAK,UAAU,gBAAgB,0BAA0B;QAClH;QACA;;OAED,UAAU,YAAY,MAAM,kBAAkB,OAAO,gBAAgB,KAAK,UAAU,yBAAyB;QAC5G;QACA;;;;;;;;;WASG;aACE,MAAM;aACN;OACN,OAAO,uBAAuB,KAAK,OAAO,gBAAgB,KAAK,UAAU,gBAAgB,uBAAuB;QAC/G;QACA;;OAED,UAAU,YAAY,MAAM,kBAAkB,OAAO,gBAAgB,KAAK,UAAU,sBAAsB;QACzG;QACA;;;;WAIG;aACE,MAAM;aACN,OAAO,MAAM,YAAY,KAAK,OAAO,gBAAgB,KAAK,UAAU,4BAA4B;MACvG;MACA;;;WAGK,oBAAoB;WACpB,WAAW;WACX,gBAAgB;WAChB,iBAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-DAJXp26i.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;cAac,mCAAmC,0BAA0B,SAAS;EAClF,qBAAqB;EACrB,YAAY,gCAAgC;YAClC,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,sCAAsC;KAC3C,uBAAuB,oBAAoB,gBAAgB,mBAAmB,qBAAqB;;;;;;;cAO1F,iCAAiC,2CAA2C;WAC/E,uBAAuB;WACvB,mBAAmB;WACnB,uBAAuB"}