@mikro-orm/sql 7.0.0-dev.230 → 7.0.0-dev.232
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/dialects/mysql/MySqlSchemaHelper.d.ts +9 -0
- package/dialects/mysql/MySqlSchemaHelper.js +75 -6
- package/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +22 -0
- package/dialects/postgresql/PostgreSqlSchemaHelper.js +141 -5
- package/dialects/sqlite/SqliteSchemaHelper.js +2 -1
- package/package.json +2 -2
- package/schema/DatabaseTable.d.ts +12 -0
- package/schema/DatabaseTable.js +69 -1
- package/schema/SchemaComparator.d.ts +8 -0
- package/schema/SchemaComparator.js +76 -0
- package/schema/SchemaHelper.d.ts +9 -0
- package/schema/SchemaHelper.js +60 -7
- package/tsconfig.build.tsbuildinfo +1 -1
- package/typings.d.ts +24 -1
package/typings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Generated, Kysely } from 'kysely';
|
|
2
|
-
import type { CheckCallback, DeferMode, Dictionary, EntityName, EntityProperty, EntitySchemaWithMeta, FilterQuery, GroupOperator, Opt, Primary, PrimaryProperty, QueryFlag, QueryOrderMap, RawQueryFragment, Type } from '@mikro-orm/core';
|
|
2
|
+
import type { CheckCallback, DeferMode, Dictionary, EntityName, EntityProperty, EntitySchemaWithMeta, FilterQuery, GroupOperator, IndexColumnOptions, Opt, Primary, PrimaryProperty, QueryFlag, QueryOrderMap, RawQueryFragment, Type } from '@mikro-orm/core';
|
|
3
3
|
import type { JoinType, QueryType } from './query/enums.js';
|
|
4
4
|
import type { DatabaseSchema } from './schema/DatabaseSchema.js';
|
|
5
5
|
import type { DatabaseTable } from './schema/DatabaseTable.js';
|
|
@@ -78,6 +78,29 @@ export interface IndexDef {
|
|
|
78
78
|
predicate?: string;
|
|
79
79
|
}>;
|
|
80
80
|
deferMode?: DeferMode | `${DeferMode}`;
|
|
81
|
+
/**
|
|
82
|
+
* Advanced column options for the index.
|
|
83
|
+
* When specified, these options override the simple columnNames for index generation.
|
|
84
|
+
*/
|
|
85
|
+
columns?: IndexColumnOptions[];
|
|
86
|
+
/**
|
|
87
|
+
* Columns to include in the index but not as part of the key (PostgreSQL, MSSQL).
|
|
88
|
+
*/
|
|
89
|
+
include?: string[];
|
|
90
|
+
/** Fill factor for the index as a percentage 0-100 (PostgreSQL, MSSQL). */
|
|
91
|
+
fillFactor?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the index is invisible/hidden from the query optimizer (MySQL 8+, MariaDB 10.6+, MongoDB).
|
|
94
|
+
*/
|
|
95
|
+
invisible?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the index is disabled (MSSQL only).
|
|
98
|
+
*/
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the index should be clustered (MariaDB, MSSQL).
|
|
102
|
+
*/
|
|
103
|
+
clustered?: boolean;
|
|
81
104
|
}
|
|
82
105
|
export interface CheckDef<T = unknown> {
|
|
83
106
|
name: string;
|