@mikro-orm/sql 7.0.2 → 7.0.3-dev.1
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/AbstractSqlConnection.d.ts +58 -94
- package/AbstractSqlConnection.js +238 -235
- package/AbstractSqlDriver.d.ts +155 -411
- package/AbstractSqlDriver.js +1937 -2061
- package/AbstractSqlPlatform.d.ts +73 -83
- package/AbstractSqlPlatform.js +158 -162
- package/PivotCollectionPersister.d.ts +15 -33
- package/PivotCollectionPersister.js +160 -158
- package/SqlEntityManager.d.ts +22 -67
- package/SqlEntityManager.js +38 -54
- package/SqlEntityRepository.d.ts +14 -14
- package/SqlEntityRepository.js +23 -23
- package/dialects/mssql/MsSqlNativeQueryBuilder.d.ts +12 -12
- package/dialects/mssql/MsSqlNativeQueryBuilder.js +194 -192
- package/dialects/mysql/BaseMySqlPlatform.d.ts +45 -64
- package/dialects/mysql/BaseMySqlPlatform.js +131 -134
- package/dialects/mysql/MySqlExceptionConverter.d.ts +6 -6
- package/dialects/mysql/MySqlExceptionConverter.js +77 -91
- package/dialects/mysql/MySqlNativeQueryBuilder.d.ts +3 -3
- package/dialects/mysql/MySqlNativeQueryBuilder.js +69 -66
- package/dialects/mysql/MySqlSchemaHelper.d.ts +39 -39
- package/dialects/mysql/MySqlSchemaHelper.js +319 -327
- package/dialects/oracledb/OracleDialect.d.ts +52 -81
- package/dialects/oracledb/OracleDialect.js +149 -155
- package/dialects/oracledb/OracleNativeQueryBuilder.d.ts +12 -12
- package/dialects/oracledb/OracleNativeQueryBuilder.js +236 -232
- package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +105 -108
- package/dialects/postgresql/BasePostgreSqlPlatform.js +350 -351
- package/dialects/postgresql/FullTextType.d.ts +6 -10
- package/dialects/postgresql/FullTextType.js +51 -51
- package/dialects/postgresql/PostgreSqlExceptionConverter.d.ts +5 -5
- package/dialects/postgresql/PostgreSqlExceptionConverter.js +43 -55
- package/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts +1 -1
- package/dialects/postgresql/PostgreSqlNativeQueryBuilder.js +4 -4
- package/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +82 -102
- package/dialects/postgresql/PostgreSqlSchemaHelper.js +683 -711
- package/dialects/sqlite/BaseSqliteConnection.d.ts +5 -3
- package/dialects/sqlite/BaseSqliteConnection.js +19 -21
- package/dialects/sqlite/NodeSqliteDialect.d.ts +1 -1
- package/dialects/sqlite/NodeSqliteDialect.js +23 -23
- package/dialects/sqlite/SqliteDriver.d.ts +1 -1
- package/dialects/sqlite/SqliteDriver.js +3 -3
- package/dialects/sqlite/SqliteExceptionConverter.d.ts +6 -6
- package/dialects/sqlite/SqliteExceptionConverter.js +51 -67
- package/dialects/sqlite/SqliteNativeQueryBuilder.d.ts +2 -2
- package/dialects/sqlite/SqliteNativeQueryBuilder.js +7 -7
- package/dialects/sqlite/SqlitePlatform.d.ts +72 -63
- package/dialects/sqlite/SqlitePlatform.js +139 -139
- package/dialects/sqlite/SqliteSchemaHelper.d.ts +60 -70
- package/dialects/sqlite/SqliteSchemaHelper.js +520 -533
- package/package.json +2 -2
- package/plugin/index.d.ts +35 -42
- package/plugin/index.js +36 -43
- package/plugin/transformer.d.ts +94 -117
- package/plugin/transformer.js +881 -890
- package/query/ArrayCriteriaNode.d.ts +4 -4
- package/query/ArrayCriteriaNode.js +18 -18
- package/query/CriteriaNode.d.ts +25 -35
- package/query/CriteriaNode.js +123 -133
- package/query/CriteriaNodeFactory.d.ts +6 -49
- package/query/CriteriaNodeFactory.js +94 -97
- package/query/NativeQueryBuilder.d.ts +118 -118
- package/query/NativeQueryBuilder.js +480 -484
- package/query/ObjectCriteriaNode.d.ts +12 -12
- package/query/ObjectCriteriaNode.js +282 -298
- package/query/QueryBuilder.d.ts +904 -1546
- package/query/QueryBuilder.js +2145 -2270
- package/query/QueryBuilderHelper.d.ts +72 -153
- package/query/QueryBuilderHelper.js +1028 -1079
- package/query/ScalarCriteriaNode.d.ts +3 -3
- package/query/ScalarCriteriaNode.js +46 -53
- package/query/enums.d.ts +14 -14
- package/query/enums.js +14 -14
- package/query/raw.d.ts +6 -16
- package/query/raw.js +10 -10
- package/schema/DatabaseSchema.d.ts +50 -73
- package/schema/DatabaseSchema.js +307 -331
- package/schema/DatabaseTable.d.ts +73 -96
- package/schema/DatabaseTable.js +927 -1012
- package/schema/SchemaComparator.d.ts +66 -58
- package/schema/SchemaComparator.js +740 -744
- package/schema/SchemaHelper.d.ts +95 -109
- package/schema/SchemaHelper.js +659 -675
- package/schema/SqlSchemaGenerator.d.ts +58 -78
- package/schema/SqlSchemaGenerator.js +501 -535
- package/typings.d.ts +266 -380
|
@@ -7,62 +7,70 @@ import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js';
|
|
|
7
7
|
* Compares two Schemas and return an instance of SchemaDifference.
|
|
8
8
|
*/
|
|
9
9
|
export declare class SchemaComparator {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
10
|
+
#private;
|
|
11
|
+
constructor(platform: AbstractSqlPlatform);
|
|
12
|
+
/**
|
|
13
|
+
* Returns a SchemaDifference object containing the differences between the schemas fromSchema and toSchema.
|
|
14
|
+
*
|
|
15
|
+
* The returned differences are returned in such a way that they contain the
|
|
16
|
+
* operations to change the schema stored in fromSchema to the schema that is
|
|
17
|
+
* stored in toSchema.
|
|
18
|
+
*/
|
|
19
|
+
compare(fromSchema: DatabaseSchema, toSchema: DatabaseSchema, inverseDiff?: SchemaDifference): SchemaDifference;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the difference between the tables fromTable and toTable.
|
|
22
|
+
* If there are no differences this method returns the boolean false.
|
|
23
|
+
*/
|
|
24
|
+
diffTable(fromTable: DatabaseTable, toTable: DatabaseTable, inverseTableDiff?: TableDifference): TableDifference | false;
|
|
25
|
+
/**
|
|
26
|
+
* Try to find columns that only changed their name, rename operations maybe cheaper than add/drop
|
|
27
|
+
* however ambiguities between different possibilities should not lead to renaming at all.
|
|
28
|
+
*/
|
|
29
|
+
private detectColumnRenamings;
|
|
30
|
+
/**
|
|
31
|
+
* Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop
|
|
32
|
+
* however ambiguities between different possibilities should not lead to renaming at all.
|
|
33
|
+
*/
|
|
34
|
+
private detectIndexRenamings;
|
|
35
|
+
diffForeignKey(key1: ForeignKey, key2: ForeignKey, tableDifferences: TableDifference): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the difference between the columns
|
|
38
|
+
*/
|
|
39
|
+
diffColumn(fromColumn: Column, toColumn: Column, fromTable: DatabaseTable, logging?: boolean): Set<string>;
|
|
40
|
+
diffEnumItems(items1?: string[], items2?: string[]): boolean;
|
|
41
|
+
diffComment(comment1?: string, comment2?: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Finds the difference between the indexes index1 and index2.
|
|
44
|
+
* Compares index1 with index2 and returns index2 if there are any differences or false in case there are no differences.
|
|
45
|
+
*/
|
|
46
|
+
diffIndex(index1: IndexDef, index2: IndexDef): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Checks if the other index already fulfills all the indexing and constraint needs of the current one.
|
|
49
|
+
*/
|
|
50
|
+
isIndexFulfilledBy(index1: IndexDef, index2: IndexDef): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Compare advanced column options between two indexes.
|
|
53
|
+
*/
|
|
54
|
+
private compareIndexColumns;
|
|
55
|
+
/**
|
|
56
|
+
* Compare two arrays for equality (order matters).
|
|
57
|
+
*/
|
|
58
|
+
private compareArrays;
|
|
59
|
+
diffExpression(expr1: string, expr2: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Compares two view expressions, with special handling for SELECT *.
|
|
62
|
+
* Databases like PostgreSQL and MySQL expand `SELECT *` to explicit column names
|
|
63
|
+
* in their stored view definitions, which makes diffExpression always detect changes.
|
|
64
|
+
* When SELECT * is present, we strip the first SELECT...FROM column list from both
|
|
65
|
+
* sides and compare only the structural parts (FROM clause onwards).
|
|
66
|
+
* Note: this means changes *within* subqueries in the SELECT list of a SELECT * view
|
|
67
|
+
* may not be detected — an acceptable tradeoff since SELECT * views are inherently
|
|
68
|
+
* column-list-agnostic.
|
|
69
|
+
* @see https://github.com/mikro-orm/mikro-orm/issues/7308
|
|
70
|
+
*/
|
|
71
|
+
private diffViewExpression;
|
|
72
|
+
parseJsonDefault(defaultValue?: string | null): Dictionary | string | null;
|
|
73
|
+
hasSameDefaultValue(from: Column, to: Column): boolean;
|
|
74
|
+
private mapColumnToProperty;
|
|
75
|
+
private log;
|
|
68
76
|
}
|