uql-orm 0.66.0 → 0.67.0

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.
Files changed (193) hide show
  1. package/dist/browser/querier/httpQuerier.js +1 -8
  2. package/dist/browser/uql-browser.min.js.map +5 -5
  3. package/dist/bunSql/bunSql.util.d.ts +2 -6
  4. package/dist/bunSql/bunSql.util.js +2 -6
  5. package/dist/bunSql/bunSqlQuerier.d.ts +2 -5
  6. package/dist/bunSql/bunSqlQuerier.js +2 -5
  7. package/dist/cockroachdb/cockroachDialect.d.ts +4 -13
  8. package/dist/cockroachdb/cockroachDialect.js +4 -13
  9. package/dist/context/context.browser.js +2 -10
  10. package/dist/context/context.d.ts +4 -17
  11. package/dist/context/context.js +4 -17
  12. package/dist/dialect/abstractDialect.d.ts +4 -19
  13. package/dist/dialect/abstractDialect.js +2 -20
  14. package/dist/dialect/abstractSqlDialect.d.ts +47 -212
  15. package/dist/dialect/abstractSqlDialect.js +68 -222
  16. package/dist/dialect/aliases.d.ts +2 -12
  17. package/dist/dialect/aliases.js +4 -12
  18. package/dist/dialect/hydrateColumn.d.ts +2 -6
  19. package/dist/dialect/hydrateColumn.js +3 -13
  20. package/dist/dialect/jsonArrayElemMatchUtils.d.ts +1 -7
  21. package/dist/dialect/jsonArrayElemMatchUtils.js +1 -7
  22. package/dist/dialect/jsonSql.d.ts +6 -27
  23. package/dist/dialect/jsonSql.js +6 -27
  24. package/dist/dialect/mergeSqlDialect.d.ts +4 -22
  25. package/dist/dialect/mergeSqlDialect.js +4 -22
  26. package/dist/dialect/mysqlLikeSqlDialect.d.ts +11 -37
  27. package/dist/dialect/mysqlLikeSqlDialect.js +35 -51
  28. package/dist/dialect/pgLikeSqlDialect.d.ts +8 -22
  29. package/dist/dialect/pgLikeSqlDialect.js +36 -39
  30. package/dist/dialect/queryContext.d.ts +4 -22
  31. package/dist/dialect/queryContext.js +4 -22
  32. package/dist/dialect/queryJoins.d.ts +3 -12
  33. package/dist/dialect/queryJoins.js +3 -12
  34. package/dist/dialect/vectorCast.d.ts +2 -12
  35. package/dist/dialect/vectorCast.js +3 -19
  36. package/dist/dialect/vectorSqlDialect.d.ts +8 -38
  37. package/dist/dialect/vectorSqlDialect.js +7 -38
  38. package/dist/entity/decorator/bag.d.ts +6 -19
  39. package/dist/entity/decorator/bag.js +6 -22
  40. package/dist/entity/decorator/entity.d.ts +2 -7
  41. package/dist/entity/decorator/entity.js +2 -7
  42. package/dist/entity/decorator/members.d.ts +7 -30
  43. package/dist/entity/decorator/members.js +3 -12
  44. package/dist/entity/metadata/definition.d.ts +2 -18
  45. package/dist/entity/metadata/definition.js +6 -28
  46. package/dist/http/handler.d.ts +2 -14
  47. package/dist/index.d.ts +3 -1
  48. package/dist/index.js +3 -1
  49. package/dist/libsql/libsqlDialect.d.ts +1 -8
  50. package/dist/libsql/libsqlDialect.js +1 -8
  51. package/dist/maria/mariaDialect.d.ts +3 -5
  52. package/dist/maria/mariaDialect.js +5 -5
  53. package/dist/maria/mariadbQuerier.js +2 -2
  54. package/dist/maria/mariadbQuerierPool.js +1 -6
  55. package/dist/migrate/builder/migrationBuilder.js +3 -19
  56. package/dist/migrate/builder/splitSqlStatements.d.ts +1 -14
  57. package/dist/migrate/builder/splitSqlStatements.js +2 -22
  58. package/dist/migrate/builder/types.d.ts +2 -15
  59. package/dist/migrate/cli-config.js +2 -11
  60. package/dist/migrate/cli.js +2 -7
  61. package/dist/migrate/codegen/entityCodeGenerator.d.ts +0 -15
  62. package/dist/migrate/codegen/entityCodeGenerator.js +15 -44
  63. package/dist/migrate/codegen/fieldOptionsSource.d.ts +1 -8
  64. package/dist/migrate/codegen/fieldOptionsSource.js +3 -22
  65. package/dist/migrate/ddl/indexDdl.d.ts +2 -5
  66. package/dist/migrate/ddl/indexDdl.js +2 -5
  67. package/dist/migrate/ddl/pgIndexDdl.d.ts +3 -13
  68. package/dist/migrate/ddl/pgIndexDdl.js +3 -13
  69. package/dist/migrate/generator/definitionToNode.d.ts +2 -9
  70. package/dist/migrate/generator/definitionToNode.js +3 -17
  71. package/dist/migrate/generator/indexNodeToSchema.d.ts +2 -3
  72. package/dist/migrate/generator/indexNodeToSchema.js +2 -3
  73. package/dist/migrate/generator/mongoCommand.d.ts +1 -8
  74. package/dist/migrate/generator/mongoSchemaGenerator.d.ts +1 -8
  75. package/dist/migrate/generator/mongoSchemaGenerator.js +1 -8
  76. package/dist/migrate/introspection/abstractSqlSchemaIntrospector.d.ts +6 -26
  77. package/dist/migrate/introspection/abstractSqlSchemaIntrospector.js +9 -41
  78. package/dist/migrate/introspection/baseSqlIntrospector.js +0 -1
  79. package/dist/migrate/introspection/mongoIntrospector.d.ts +3 -1
  80. package/dist/migrate/introspection/mongoIntrospector.js +48 -46
  81. package/dist/migrate/introspection/mssqlIntrospector.d.ts +4 -4
  82. package/dist/migrate/introspection/mssqlIntrospector.js +18 -27
  83. package/dist/migrate/introspection/mysqlIntrospector.d.ts +7 -2
  84. package/dist/migrate/introspection/mysqlIntrospector.js +16 -14
  85. package/dist/migrate/introspection/postgresIntrospector.d.ts +24 -9
  86. package/dist/migrate/introspection/postgresIntrospector.js +68 -59
  87. package/dist/migrate/introspection/sqliteIntrospector.d.ts +1 -1
  88. package/dist/migrate/introspection/sqliteIntrospector.js +8 -10
  89. package/dist/migrate/migrator.d.ts +9 -53
  90. package/dist/migrate/migrator.js +32 -65
  91. package/dist/migrate/schemaGenerator.d.ts +16 -66
  92. package/dist/migrate/schemaGenerator.js +21 -74
  93. package/dist/mongo/mongoDialect.d.ts +21 -53
  94. package/dist/mongo/mongoDialect.js +25 -70
  95. package/dist/mongo/mongodbQuerier.d.ts +5 -8
  96. package/dist/mongo/mongodbQuerier.js +31 -65
  97. package/dist/mssql/mssqlDialect.d.ts +8 -34
  98. package/dist/mssql/mssqlDialect.js +37 -51
  99. package/dist/mssql/mssqlQuerier.d.ts +37 -4
  100. package/dist/mssql/mssqlQuerier.js +2 -2
  101. package/dist/mssql/mssqlWireTypes.d.ts +2 -14
  102. package/dist/mssql/mssqlWireTypes.js +2 -14
  103. package/dist/nestjs/uqlModule.js +2 -7
  104. package/dist/pglite/pgliteQuerier.d.ts +1 -9
  105. package/dist/pglite/pgliteQuerierPool.d.ts +4 -26
  106. package/dist/pglite/pgliteQuerierPool.js +3 -18
  107. package/dist/postgres/abstractPgQuerierPool.d.ts +1 -8
  108. package/dist/postgres/abstractPgQuerierPool.js +1 -8
  109. package/dist/postgres/pgNumericTypes.d.ts +3 -26
  110. package/dist/postgres/pgNumericTypes.js +3 -26
  111. package/dist/postgres/postgresDialect.d.ts +4 -10
  112. package/dist/postgres/postgresDialect.js +4 -10
  113. package/dist/querier/abstractQuerier.d.ts +35 -103
  114. package/dist/querier/abstractQuerier.js +105 -201
  115. package/dist/querier/abstractSharedHandleQuerierPool.d.ts +3 -17
  116. package/dist/querier/abstractSharedHandleQuerierPool.js +3 -17
  117. package/dist/querier/abstractSqlQuerier.d.ts +15 -36
  118. package/dist/querier/abstractSqlQuerier.js +49 -131
  119. package/dist/schema/canonicalType.d.ts +3 -21
  120. package/dist/schema/canonicalType.js +22 -67
  121. package/dist/schema/dependencyGraph.d.ts +2 -8
  122. package/dist/schema/dependencyGraph.js +2 -32
  123. package/dist/schema/index.d.ts +1 -25
  124. package/dist/schema/index.js +0 -26
  125. package/dist/schema/indexColumns.d.ts +1 -8
  126. package/dist/schema/indexColumns.js +1 -8
  127. package/dist/schema/indexDifferences.d.ts +7 -40
  128. package/dist/schema/indexDifferences.js +6 -31
  129. package/dist/schema/schemaAST.d.ts +8 -175
  130. package/dist/schema/schemaAST.js +13 -365
  131. package/dist/schema/schemaASTBuilder.d.ts +2 -24
  132. package/dist/schema/schemaASTBuilder.js +2 -30
  133. package/dist/schema/schemaASTDiffer.d.ts +6 -46
  134. package/dist/schema/schemaASTDiffer.js +8 -56
  135. package/dist/schema/types.d.ts +5 -61
  136. package/dist/schema/types.js +3 -6
  137. package/dist/sqlite/abstractSqliteQuerier.d.ts +1 -8
  138. package/dist/sqlite/localSqliteQuerierPool.d.ts +1 -7
  139. package/dist/sqlite/localSqliteQuerierPool.js +1 -7
  140. package/dist/sqlite/nodeSqliteQuerierPool.d.ts +2 -7
  141. package/dist/sqlite/nodeSqliteQuerierPool.js +2 -7
  142. package/dist/sqlite/sqliteDialect.d.ts +5 -20
  143. package/dist/sqlite/sqliteDialect.js +29 -35
  144. package/dist/turso/tursoDialect.d.ts +4 -6
  145. package/dist/turso/tursoDialect.js +4 -6
  146. package/dist/turso/tursoLocalQuerierPool.d.ts +1 -7
  147. package/dist/turso/tursoLocalQuerierPool.js +1 -7
  148. package/dist/turso/tursoQuerierPool.d.ts +2 -6
  149. package/dist/turso/tursoQuerierPool.js +2 -6
  150. package/dist/turso/tursoSessionQuerier.d.ts +1 -7
  151. package/dist/turso/tursoSessionQuerier.js +1 -7
  152. package/dist/type/dialect.d.ts +42 -94
  153. package/dist/type/dialect.js +3 -13
  154. package/dist/type/entity.d.ts +163 -534
  155. package/dist/type/entity.js +26 -9
  156. package/dist/type/logger.d.ts +2 -14
  157. package/dist/type/migration.d.ts +9 -38
  158. package/dist/type/querier.d.ts +9 -28
  159. package/dist/type/querierPool.d.ts +4 -26
  160. package/dist/type/query.d.ts +19 -73
  161. package/dist/type/query.js +2 -7
  162. package/dist/type/queryAggregate.d.ts +18 -98
  163. package/dist/type/queryRaw.d.ts +1 -8
  164. package/dist/type/queryRaw.js +1 -8
  165. package/dist/type/queryWhere.d.ts +13 -61
  166. package/dist/type/universalQuerier.d.ts +18 -105
  167. package/dist/type/utility.d.ts +12 -24
  168. package/dist/type/vector.d.ts +8 -38
  169. package/dist/type/vector.js +1 -1
  170. package/dist/type/wire.d.ts +2 -5
  171. package/dist/util/dialect.util.d.ts +9 -27
  172. package/dist/util/dialect.util.js +10 -27
  173. package/dist/util/field.util.d.ts +2 -31
  174. package/dist/util/field.util.js +3 -43
  175. package/dist/util/fieldOption.util.d.ts +7 -15
  176. package/dist/util/fieldOption.util.js +1 -1
  177. package/dist/util/filters.util.d.ts +2 -5
  178. package/dist/util/filters.util.js +2 -5
  179. package/dist/util/logger.d.ts +2 -6
  180. package/dist/util/logger.js +2 -6
  181. package/dist/util/object.util.d.ts +2 -6
  182. package/dist/util/object.util.js +1 -5
  183. package/dist/util/raw.d.ts +3 -23
  184. package/dist/util/relationQuery.util.d.ts +3 -14
  185. package/dist/util/relationQuery.util.js +3 -14
  186. package/dist/util/rowKey.util.d.ts +2 -10
  187. package/dist/util/rowKey.util.js +2 -10
  188. package/dist/util/sql.util.d.ts +6 -37
  189. package/dist/util/sql.util.js +13 -73
  190. package/dist/util/sqlLiteral.d.ts +2 -13
  191. package/dist/util/sqlLiteral.js +8 -13
  192. package/dist/util/string.util.js +0 -2
  193. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import type { EntityMeta, UpdatePayload } from './entity.js';
2
- import type { Query, QueryConflictPaths, QueryFilter, QueryOptions, QuerySearch } from './query.js';
2
+ import type { Query, QueryConflictPaths, QueryOptions, QueryPage, QuerySearch } from './query.js';
3
3
  import type { QueryAggMap, QueryAggregate, QueryGroupMap } from './queryAggregate.js';
4
4
  import type { Type } from './utility.js';
5
5
  /**
@@ -70,13 +70,7 @@ export interface DriverCapabilities {
70
70
  */
71
71
  readonly nativeArrays: boolean;
72
72
  }
73
- /**
74
- * How a dialect surfaces the IDs generated by an INSERT statement:
75
- * - `'returning'`: the statement itself returns one row per inserted record (`RETURNING`,
76
- * or MongoDB's `insertedIds`), so IDs are exact for every row.
77
- * - `'firstId'`: the driver header only exposes the first generated ID (MySQL `insertId`);
78
- * the remaining IDs are inferred by incrementing it.
79
- */
73
+ /** How a dialect reports inserted ids: from the statement per row, or MySQL's first id, the rest inferred. */
80
74
  export type InsertIdSource = 'returning' | 'firstId';
81
75
  /**
82
76
  * Features of the database engine (SQL syntax layer).
@@ -99,25 +93,11 @@ export interface DialectFeatures {
99
93
  */
100
94
  readonly primaryKeyAlter: boolean;
101
95
  /**
102
- * Whether a stored generated column can be added to a table that already exists. False on SQLite,
103
- * which takes one in a `CREATE TABLE` and rejects the same column in an `ALTER` ("cannot add a
104
- * STORED column"), since filling it would rewrite every row - so a sync that would add one is
105
- * refused by name rather than by the driver.
106
- *
107
- * A boolean rather than a mode: SQLite would accept a `VIRTUAL` column here, but emitting one where
108
- * the entity said `stored` makes the same entity a stored column on a new database and a virtual one
109
- * on an old, which nothing diffs and no one can see. Refusal has one form; only what UQL *emits*
110
- * earns a mode, which is what makes {@link DialectFeatures.commentSyntax} three-way.
96
+ * Whether a stored generated column can be added to an existing table. SQLite takes one only in a
97
+ * `CREATE TABLE`, so a sync that would add one is refused by name.
111
98
  */
112
99
  readonly generatedColumnAdd: boolean;
113
- /**
114
- * How this engine carries a comment on a table or a column, if at all: `inline` writes it into the
115
- * declaration (MySQL, MariaDB), `statement` needs a `COMMENT ON` of its own (Postgres, CockroachDB),
116
- * `none` has no such thing (SQLite, MongoDB).
117
- *
118
- * One knob rather than a boolean because the answer is three-way. Read as a boolean, Postgres landed
119
- * on the same branch as SQLite and a documented column silently lost its comment.
120
- */
100
+ /** Where a comment goes: in the declaration (MySQL family), a `COMMENT ON` of its own (Postgres family), or nowhere. */
121
101
  readonly commentSyntax: 'inline' | 'statement' | 'none';
122
102
  /**
123
103
  * Whether every column of a vector index has to be `NOT NULL`, which MariaDB 12.3 enforces ("All
@@ -130,13 +110,8 @@ export interface DialectFeatures {
130
110
  /** Whether the dialect natively supports the TIMESTAMPTZ alias/type. */
131
111
  readonly supportsTimestamptz: boolean;
132
112
  /**
133
- * How a `string` column is sized: `text` is always the unbounded type whatever length was asked
134
- * for (SQLite, whose affinity makes a bound meaningless), `bounded-text` takes the bound when there
135
- * is one and the unbounded type otherwise (the Postgres family), `varchar` is always bounded and
136
- * falls back to 255 (the MySQL family, SQL Server).
137
- *
138
- * Three-way for the reason {@link commentSyntax} is: a boolean puts SQLite and Postgres on the
139
- * same branch, and they need different answers.
113
+ * How a string column is sized: always unbounded (`text`, SQLite), bounded where a length is given
114
+ * (`bounded-text`, the Postgres family), or always bounded, 255 by default (`varchar`).
140
115
  */
141
116
  readonly stringSizing: 'text' | 'bounded-text' | 'varchar';
142
117
  /** Whether the engine has unsigned integers, so `@Field({ unsigned: true })` reaches the column. */
@@ -148,6 +123,29 @@ export interface DialectFeatures {
148
123
  */
149
124
  readonly serverSideCursors: boolean;
150
125
  }
126
+ /** What a SQL engine can do beyond {@link DialectFeatures}, read where a statement is built. */
127
+ export interface SqlDialectFeatures extends DialectFeatures {
128
+ /** Whether the engine has row locks at all. The SQLite family locks the database instead. */
129
+ readonly rowLocks: boolean;
130
+ /** Whether `FOR UPDATE` may share a statement with a window function, which the Postgres family refuses. */
131
+ readonly rowLockWithWindow: boolean;
132
+ /** Whether a lock can be narrowed to one table of a join, `FOR UPDATE OF`, which MariaDB lacks. */
133
+ readonly rowLockOf: boolean;
134
+ /** Whether a multi-row upsert's `RETURNING` lists its rows in payload order; where not, the ids are read back. */
135
+ readonly orderedUpsertReturning: boolean;
136
+ /** Whether a JSON aggregate takes an `ORDER BY` of its own; where not, a relation's rows keep their derived table's order. */
137
+ readonly orderedJsonAggregates: boolean;
138
+ /** Whether JSON array containment matches an object element that merely includes the given keys, as `@>` does. */
139
+ readonly partialJsonContainment: boolean;
140
+ /** Whether an exploded scalar JSON element keeps its SQL type, as SQLite's `JSON_EACH` does. */
141
+ readonly typedJsonElements: boolean;
142
+ /** Whether the engine has pgvector's `halfvec` and `sparsevec`; elsewhere both map onto `vector`. */
143
+ readonly narrowVectorTypes: boolean;
144
+ /** Whether an ANN index's tuning `SET` applies only inside a transaction, as `SET LOCAL` does. */
145
+ readonly vectorTuningNeedsTransaction: boolean;
146
+ /** Whether the serial column type states `PRIMARY KEY` itself, as SQLite's `AUTOINCREMENT` must. */
147
+ readonly serialDeclaresPrimaryKey: boolean;
148
+ }
151
149
  /**
152
150
  * What a SQL statement is rendered through, as a `raw` callback and a query context see it:
153
151
  * `AbstractSqlDialect` is the one implementation.
@@ -161,59 +159,19 @@ export interface SqlQueryDialect {
161
159
  * the escape character for identifiers.
162
160
  */
163
161
  readonly escapeIdChar: '"' | '`';
164
- /**
165
- * The dialect features.
166
- */
167
- readonly features: DialectFeatures;
168
- /**
169
- * obtains the records matching the given search parameters.
170
- * @param ctx the query context
171
- * @param entity the target entity
172
- * @param q the criteria options
173
- * @param opts the query options
174
- * @param totalAlias when given, carry the unpaged match count on every row under this alias
175
- */
162
+ /** What the engine can do. */
163
+ readonly features: SqlDialectFeatures;
164
+ /** A read; with `totalAlias`, every row also carries the unpaged match count under that alias. */
176
165
  find<E>(ctx: QueryContext, entity: Type<E>, q: Query<E>, opts?: QueryOptions, totalAlias?: string): void;
177
- /**
178
- * counts the number of records matching the given search parameters.
179
- * @param ctx the query context
180
- * @param entity the target entity
181
- * @param q the criteria options
182
- * @param opts the query options
183
- */
184
- count<E>(ctx: QueryContext, entity: Type<E>, q: QueryFilter<E>, opts?: QueryOptions): void;
185
- /**
186
- * insert records.
187
- * @param ctx the query context
188
- * @param entity the target entity
189
- * @param payload the payload
190
- * @param opts the query options
191
- */
166
+ /** A count of the records matching the filter, or of those a page of it takes. */
167
+ count<E>(ctx: QueryContext, entity: Type<E>, q: QueryPage<E>, opts?: QueryOptions): void;
168
+ /** An insert of one record or many. */
192
169
  insert<E>(ctx: QueryContext, entity: Type<E>, payload: E | E[], opts?: QueryOptions): void;
193
- /**
194
- * update records.
195
- * @param ctx the query context
196
- * @param entity the target entity
197
- * @param q the criteria options
198
- * @param payload
199
- * @param opts the query options
200
- */
170
+ /** An update of the records the query matches. */
201
171
  update<E>(ctx: QueryContext, entity: Type<E>, q: QuerySearch<E>, payload: UpdatePayload<E>, opts?: QueryOptions): void;
202
- /**
203
- * upsert records.
204
- * @param ctx the query context
205
- * @param entity the target entity
206
- * @param conflictPaths the conflict paths
207
- * @param payload
208
- */
172
+ /** An upsert of one record or many by their conflict paths. */
209
173
  upsert<E>(ctx: QueryContext, entity: Type<E>, conflictPaths: QueryConflictPaths<E>, payload: E | E[]): void;
210
- /**
211
- * delete records.
212
- * @param ctx the query context
213
- * @param entity the target entity
214
- * @param q the criteria options
215
- * @param opts the query options
216
- */
174
+ /** A delete of the records the query matches, a soft delete where the entity has one. */
217
175
  delete<E>(ctx: QueryContext, entity: Type<E>, q: QuerySearch<E>, opts?: QueryOptions): void;
218
176
  /**
219
177
  * escape an identifier.
@@ -260,19 +218,9 @@ export interface SqlQueryDialect {
260
218
  */
261
219
  export type SqlDialectName = 'postgres' | 'cockroachdb' | 'mysql' | 'mariadb' | 'sqlite' | 'mssql';
262
220
  /**
263
- * An index capability that some engines have and others reject outright. Verified live: expression
264
- * indexes exist everywhere but MariaDB 12.3 (which needs a generated column); prefix lengths are
265
- * MySQL-family only and *required* there to index `TEXT`; `NULLS FIRST/LAST` and operator classes are
266
- * Postgres-only (CockroachDB 26.2 answers "unimplemented"); `INCLUDE` is Postgres-wire only; the
267
- * MySQL family is alone in having no partial indexes. The two JSON ones split the other way: the
268
- * engines that index a path inside a document are the ones whose planner matches the query's own
269
- * extraction back to it (Postgres, CockroachDB, SQLite - MySQL matches neither
270
- * `CAST(col->>'$.x' AS CHAR(n))` nor `JSON_VALUE(... RETURNING ...)`, verified on 26.7, and needs a
271
- * generated column instead), while MySQL alone has the multi-valued index a JSON array needs.
272
- *
273
- * Introspectors reuse the vocabulary for what they can read *back*, which is what diffing may
274
- * compare. The two sets are deliberately not the same object and must not be unified: Postgres can
275
- * emit an expression index and read one back, but MySQL emits one it cannot describe afterwards.
221
+ * An index capability some engines lack, named in the words an error reports it in. Introspectors use
222
+ * the same vocabulary for what they can read back, a separate set: MySQL emits an expression index it
223
+ * cannot describe again. The engines behind each are in the index guide.
276
224
  */
277
225
  export declare const INDEX_FEATURE_LABELS: {
278
226
  readonly expression: 'expression indexes';
@@ -1,17 +1,7 @@
1
1
  /**
2
- * An index capability that some engines have and others reject outright. Verified live: expression
3
- * indexes exist everywhere but MariaDB 12.3 (which needs a generated column); prefix lengths are
4
- * MySQL-family only and *required* there to index `TEXT`; `NULLS FIRST/LAST` and operator classes are
5
- * Postgres-only (CockroachDB 26.2 answers "unimplemented"); `INCLUDE` is Postgres-wire only; the
6
- * MySQL family is alone in having no partial indexes. The two JSON ones split the other way: the
7
- * engines that index a path inside a document are the ones whose planner matches the query's own
8
- * extraction back to it (Postgres, CockroachDB, SQLite - MySQL matches neither
9
- * `CAST(col->>'$.x' AS CHAR(n))` nor `JSON_VALUE(... RETURNING ...)`, verified on 26.7, and needs a
10
- * generated column instead), while MySQL alone has the multi-valued index a JSON array needs.
11
- *
12
- * Introspectors reuse the vocabulary for what they can read *back*, which is what diffing may
13
- * compare. The two sets are deliberately not the same object and must not be unified: Postgres can
14
- * emit an expression index and read one back, but MySQL emits one it cannot describe afterwards.
2
+ * An index capability some engines lack, named in the words an error reports it in. Introspectors use
3
+ * the same vocabulary for what they can read back, a separate set: MySQL emits an expression index it
4
+ * cannot describe again. The engines behind each are in the index guide.
15
5
  */
16
6
  export const INDEX_FEATURE_LABELS = {
17
7
  expression: 'expression indexes',