uql-orm 0.65.1 → 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.
- package/dist/browser/querier/httpQuerier.js +1 -8
- package/dist/browser/uql-browser.min.js.map +5 -5
- package/dist/bunSql/bunSql.util.d.ts +2 -6
- package/dist/bunSql/bunSql.util.js +2 -6
- package/dist/bunSql/bunSqlQuerier.d.ts +2 -5
- package/dist/bunSql/bunSqlQuerier.js +2 -5
- package/dist/cockroachdb/cockroachDialect.d.ts +4 -13
- package/dist/cockroachdb/cockroachDialect.js +4 -13
- package/dist/context/context.browser.js +2 -10
- package/dist/context/context.d.ts +4 -17
- package/dist/context/context.js +4 -17
- package/dist/dialect/abstractDialect.d.ts +4 -19
- package/dist/dialect/abstractDialect.js +2 -20
- package/dist/dialect/abstractSqlDialect.d.ts +47 -212
- package/dist/dialect/abstractSqlDialect.js +68 -222
- package/dist/dialect/aliases.d.ts +2 -12
- package/dist/dialect/aliases.js +4 -12
- package/dist/dialect/hydrateColumn.d.ts +2 -6
- package/dist/dialect/hydrateColumn.js +3 -13
- package/dist/dialect/jsonArrayElemMatchUtils.d.ts +1 -7
- package/dist/dialect/jsonArrayElemMatchUtils.js +1 -7
- package/dist/dialect/jsonSql.d.ts +6 -27
- package/dist/dialect/jsonSql.js +6 -27
- package/dist/dialect/mergeSqlDialect.d.ts +4 -22
- package/dist/dialect/mergeSqlDialect.js +4 -22
- package/dist/dialect/mysqlLikeSqlDialect.d.ts +11 -37
- package/dist/dialect/mysqlLikeSqlDialect.js +35 -51
- package/dist/dialect/pgLikeSqlDialect.d.ts +8 -22
- package/dist/dialect/pgLikeSqlDialect.js +36 -39
- package/dist/dialect/queryContext.d.ts +4 -22
- package/dist/dialect/queryContext.js +4 -22
- package/dist/dialect/queryJoins.d.ts +3 -12
- package/dist/dialect/queryJoins.js +3 -12
- package/dist/dialect/vectorCast.d.ts +2 -12
- package/dist/dialect/vectorCast.js +3 -19
- package/dist/dialect/vectorSqlDialect.d.ts +8 -38
- package/dist/dialect/vectorSqlDialect.js +7 -38
- package/dist/entity/decorator/bag.d.ts +6 -19
- package/dist/entity/decorator/bag.js +6 -22
- package/dist/entity/decorator/entity.d.ts +5 -10
- package/dist/entity/decorator/entity.js +2 -7
- package/dist/entity/decorator/members.d.ts +10 -31
- package/dist/entity/decorator/members.js +3 -12
- package/dist/entity/metadata/definition.d.ts +5 -21
- package/dist/entity/metadata/definition.js +69 -91
- package/dist/http/handler.d.ts +2 -14
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/libsql/libsqlDialect.d.ts +1 -8
- package/dist/libsql/libsqlDialect.js +1 -8
- package/dist/maria/mariaDialect.d.ts +3 -5
- package/dist/maria/mariaDialect.js +5 -5
- package/dist/maria/mariadbQuerier.js +2 -2
- package/dist/maria/mariadbQuerierPool.js +1 -6
- package/dist/migrate/builder/migrationBuilder.js +3 -19
- package/dist/migrate/builder/splitSqlStatements.d.ts +1 -14
- package/dist/migrate/builder/splitSqlStatements.js +2 -22
- package/dist/migrate/builder/types.d.ts +2 -15
- package/dist/migrate/cli-config.js +2 -11
- package/dist/migrate/cli.js +2 -7
- package/dist/migrate/codegen/entityCodeGenerator.d.ts +0 -15
- package/dist/migrate/codegen/entityCodeGenerator.js +15 -44
- package/dist/migrate/codegen/fieldOptionsSource.d.ts +1 -8
- package/dist/migrate/codegen/fieldOptionsSource.js +3 -22
- package/dist/migrate/ddl/indexDdl.d.ts +2 -5
- package/dist/migrate/ddl/indexDdl.js +2 -5
- package/dist/migrate/ddl/pgIndexDdl.d.ts +3 -13
- package/dist/migrate/ddl/pgIndexDdl.js +3 -13
- package/dist/migrate/generator/definitionToNode.d.ts +2 -9
- package/dist/migrate/generator/definitionToNode.js +3 -17
- package/dist/migrate/generator/indexNodeToSchema.d.ts +2 -3
- package/dist/migrate/generator/indexNodeToSchema.js +2 -3
- package/dist/migrate/generator/mongoCommand.d.ts +1 -8
- package/dist/migrate/generator/mongoSchemaGenerator.d.ts +1 -8
- package/dist/migrate/generator/mongoSchemaGenerator.js +1 -8
- package/dist/migrate/introspection/abstractSqlSchemaIntrospector.d.ts +6 -26
- package/dist/migrate/introspection/abstractSqlSchemaIntrospector.js +9 -41
- package/dist/migrate/introspection/baseSqlIntrospector.js +0 -1
- package/dist/migrate/introspection/mongoIntrospector.d.ts +3 -1
- package/dist/migrate/introspection/mongoIntrospector.js +48 -46
- package/dist/migrate/introspection/mssqlIntrospector.d.ts +4 -4
- package/dist/migrate/introspection/mssqlIntrospector.js +18 -27
- package/dist/migrate/introspection/mysqlIntrospector.d.ts +7 -2
- package/dist/migrate/introspection/mysqlIntrospector.js +16 -14
- package/dist/migrate/introspection/postgresIntrospector.d.ts +24 -9
- package/dist/migrate/introspection/postgresIntrospector.js +68 -59
- package/dist/migrate/introspection/sqliteIntrospector.d.ts +1 -1
- package/dist/migrate/introspection/sqliteIntrospector.js +8 -10
- package/dist/migrate/migrator.d.ts +9 -53
- package/dist/migrate/migrator.js +32 -65
- package/dist/migrate/schemaGenerator.d.ts +20 -66
- package/dist/migrate/schemaGenerator.js +32 -93
- package/dist/mongo/mongoDialect.d.ts +21 -53
- package/dist/mongo/mongoDialect.js +25 -70
- package/dist/mongo/mongodbQuerier.d.ts +5 -8
- package/dist/mongo/mongodbQuerier.js +31 -65
- package/dist/mssql/mssqlDialect.d.ts +8 -34
- package/dist/mssql/mssqlDialect.js +37 -51
- package/dist/mssql/mssqlQuerier.d.ts +37 -4
- package/dist/mssql/mssqlQuerier.js +2 -2
- package/dist/mssql/mssqlWireTypes.d.ts +2 -14
- package/dist/mssql/mssqlWireTypes.js +2 -14
- package/dist/nestjs/uqlModule.js +2 -7
- package/dist/pglite/pgliteQuerier.d.ts +1 -9
- package/dist/pglite/pgliteQuerierPool.d.ts +4 -26
- package/dist/pglite/pgliteQuerierPool.js +3 -18
- package/dist/postgres/abstractPgQuerierPool.d.ts +1 -8
- package/dist/postgres/abstractPgQuerierPool.js +1 -8
- package/dist/postgres/pgNumericTypes.d.ts +3 -26
- package/dist/postgres/pgNumericTypes.js +3 -26
- package/dist/postgres/postgresDialect.d.ts +4 -10
- package/dist/postgres/postgresDialect.js +4 -10
- package/dist/querier/abstractQuerier.d.ts +35 -103
- package/dist/querier/abstractQuerier.js +105 -201
- package/dist/querier/abstractSharedHandleQuerierPool.d.ts +3 -17
- package/dist/querier/abstractSharedHandleQuerierPool.js +3 -17
- package/dist/querier/abstractSqlQuerier.d.ts +15 -36
- package/dist/querier/abstractSqlQuerier.js +49 -131
- package/dist/schema/canonicalType.d.ts +3 -21
- package/dist/schema/canonicalType.js +22 -67
- package/dist/schema/dependencyGraph.d.ts +2 -8
- package/dist/schema/dependencyGraph.js +2 -32
- package/dist/schema/index.d.ts +1 -25
- package/dist/schema/index.js +0 -26
- package/dist/schema/indexColumns.d.ts +1 -8
- package/dist/schema/indexColumns.js +1 -8
- package/dist/schema/indexDifferences.d.ts +7 -40
- package/dist/schema/indexDifferences.js +6 -31
- package/dist/schema/schemaAST.d.ts +8 -175
- package/dist/schema/schemaAST.js +13 -365
- package/dist/schema/schemaASTBuilder.d.ts +2 -24
- package/dist/schema/schemaASTBuilder.js +6 -41
- package/dist/schema/schemaASTDiffer.d.ts +6 -46
- package/dist/schema/schemaASTDiffer.js +8 -56
- package/dist/schema/types.d.ts +5 -61
- package/dist/schema/types.js +3 -6
- package/dist/sqlite/abstractSqliteQuerier.d.ts +1 -8
- package/dist/sqlite/localSqliteQuerierPool.d.ts +1 -7
- package/dist/sqlite/localSqliteQuerierPool.js +1 -7
- package/dist/sqlite/nodeSqliteQuerierPool.d.ts +2 -7
- package/dist/sqlite/nodeSqliteQuerierPool.js +2 -7
- package/dist/sqlite/sqliteDialect.d.ts +5 -20
- package/dist/sqlite/sqliteDialect.js +29 -35
- package/dist/turso/tursoDialect.d.ts +4 -6
- package/dist/turso/tursoDialect.js +4 -6
- package/dist/turso/tursoLocalQuerierPool.d.ts +1 -7
- package/dist/turso/tursoLocalQuerierPool.js +1 -7
- package/dist/turso/tursoQuerierPool.d.ts +2 -6
- package/dist/turso/tursoQuerierPool.js +2 -6
- package/dist/turso/tursoSessionQuerier.d.ts +1 -7
- package/dist/turso/tursoSessionQuerier.js +1 -7
- package/dist/type/dialect.d.ts +42 -94
- package/dist/type/dialect.js +3 -13
- package/dist/type/entity.d.ts +189 -551
- package/dist/type/entity.js +26 -9
- package/dist/type/logger.d.ts +2 -14
- package/dist/type/migration.d.ts +9 -38
- package/dist/type/querier.d.ts +9 -28
- package/dist/type/querierPool.d.ts +4 -26
- package/dist/type/query.d.ts +28 -78
- package/dist/type/query.js +2 -7
- package/dist/type/queryAggregate.d.ts +18 -98
- package/dist/type/queryRaw.d.ts +1 -8
- package/dist/type/queryRaw.js +1 -8
- package/dist/type/queryWhere.d.ts +13 -61
- package/dist/type/universalQuerier.d.ts +18 -105
- package/dist/type/utility.d.ts +12 -24
- package/dist/type/vector.d.ts +8 -38
- package/dist/type/vector.js +1 -1
- package/dist/type/wire.d.ts +2 -5
- package/dist/util/dialect.util.d.ts +9 -27
- package/dist/util/dialect.util.js +10 -27
- package/dist/util/field.util.d.ts +5 -37
- package/dist/util/field.util.js +7 -50
- package/dist/util/fieldOption.util.d.ts +7 -15
- package/dist/util/fieldOption.util.js +1 -1
- package/dist/util/filters.util.d.ts +2 -5
- package/dist/util/filters.util.js +2 -5
- package/dist/util/logger.d.ts +2 -6
- package/dist/util/logger.js +2 -6
- package/dist/util/object.util.d.ts +2 -6
- package/dist/util/object.util.js +1 -5
- package/dist/util/raw.d.ts +3 -23
- package/dist/util/relationQuery.util.d.ts +3 -14
- package/dist/util/relationQuery.util.js +3 -14
- package/dist/util/rowKey.util.d.ts +2 -10
- package/dist/util/rowKey.util.js +2 -10
- package/dist/util/sql.util.d.ts +6 -37
- package/dist/util/sql.util.js +13 -73
- package/dist/util/sqlLiteral.d.ts +2 -13
- package/dist/util/sqlLiteral.js +8 -13
- package/dist/util/string.util.js +0 -2
- package/package.json +4 -4
package/dist/type/dialect.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EntityMeta, UpdatePayload } from './entity.js';
|
|
2
|
-
import type { Query, QueryConflictPaths,
|
|
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
|
|
103
|
-
*
|
|
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
|
|
134
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
179
|
-
|
|
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
|
|
264
|
-
*
|
|
265
|
-
*
|
|
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';
|
package/dist/type/dialect.js
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* An index capability
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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',
|