@mikro-orm/sql 7.0.7-dev.9 → 7.0.7
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 +94 -58
- package/AbstractSqlConnection.js +235 -238
- package/AbstractSqlDriver.d.ts +410 -155
- package/AbstractSqlDriver.js +2072 -1941
- package/AbstractSqlPlatform.d.ts +85 -75
- package/AbstractSqlPlatform.js +166 -162
- package/PivotCollectionPersister.d.ts +33 -15
- package/PivotCollectionPersister.js +158 -160
- package/README.md +1 -1
- package/SqlEntityManager.d.ts +67 -22
- package/SqlEntityManager.js +54 -38
- package/SqlEntityRepository.d.ts +14 -14
- package/SqlEntityRepository.js +23 -23
- package/dialects/mssql/MsSqlNativeQueryBuilder.d.ts +12 -12
- package/dialects/mssql/MsSqlNativeQueryBuilder.js +199 -201
- package/dialects/mysql/BaseMySqlPlatform.d.ts +65 -46
- package/dialects/mysql/BaseMySqlPlatform.js +137 -134
- package/dialects/mysql/MySqlExceptionConverter.d.ts +6 -6
- package/dialects/mysql/MySqlExceptionConverter.js +91 -77
- package/dialects/mysql/MySqlNativeQueryBuilder.d.ts +3 -3
- package/dialects/mysql/MySqlNativeQueryBuilder.js +66 -69
- package/dialects/mysql/MySqlSchemaHelper.d.ts +59 -40
- package/dialects/mysql/MySqlSchemaHelper.js +327 -319
- package/dialects/oracledb/OracleDialect.d.ts +81 -52
- package/dialects/oracledb/OracleDialect.js +155 -149
- package/dialects/oracledb/OracleNativeQueryBuilder.d.ts +12 -12
- package/dialects/oracledb/OracleNativeQueryBuilder.js +239 -243
- package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +109 -106
- package/dialects/postgresql/BasePostgreSqlPlatform.js +354 -353
- package/dialects/postgresql/FullTextType.d.ts +10 -6
- package/dialects/postgresql/FullTextType.js +51 -51
- package/dialects/postgresql/PostgreSqlExceptionConverter.d.ts +5 -5
- package/dialects/postgresql/PostgreSqlExceptionConverter.js +55 -43
- package/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts +1 -1
- package/dialects/postgresql/PostgreSqlNativeQueryBuilder.js +4 -4
- package/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +118 -83
- package/dialects/postgresql/PostgreSqlSchemaHelper.js +747 -699
- package/dialects/sqlite/BaseSqliteConnection.d.ts +3 -5
- package/dialects/sqlite/BaseSqliteConnection.js +21 -19
- 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 +67 -51
- package/dialects/sqlite/SqliteNativeQueryBuilder.d.ts +2 -2
- package/dialects/sqlite/SqliteNativeQueryBuilder.js +7 -7
- package/dialects/sqlite/SqlitePlatform.d.ts +63 -72
- package/dialects/sqlite/SqlitePlatform.js +139 -139
- package/dialects/sqlite/SqliteSchemaHelper.d.ts +78 -61
- package/dialects/sqlite/SqliteSchemaHelper.js +541 -522
- package/package.json +4 -4
- package/plugin/index.d.ts +42 -35
- package/plugin/index.js +43 -36
- package/plugin/transformer.d.ts +117 -94
- package/plugin/transformer.js +890 -881
- package/query/ArrayCriteriaNode.d.ts +4 -4
- package/query/ArrayCriteriaNode.js +18 -18
- package/query/CriteriaNode.d.ts +35 -25
- package/query/CriteriaNode.js +133 -123
- package/query/CriteriaNodeFactory.d.ts +49 -6
- package/query/CriteriaNodeFactory.js +97 -94
- package/query/NativeQueryBuilder.d.ts +120 -120
- package/query/NativeQueryBuilder.js +507 -501
- package/query/ObjectCriteriaNode.d.ts +12 -12
- package/query/ObjectCriteriaNode.js +298 -282
- package/query/QueryBuilder.d.ts +1557 -905
- package/query/QueryBuilder.js +2322 -2192
- package/query/QueryBuilderHelper.d.ts +153 -72
- package/query/QueryBuilderHelper.js +1079 -1028
- package/query/ScalarCriteriaNode.d.ts +3 -3
- package/query/ScalarCriteriaNode.js +53 -46
- package/query/enums.d.ts +14 -14
- package/query/enums.js +14 -14
- package/query/raw.d.ts +16 -6
- package/query/raw.js +10 -10
- package/schema/DatabaseSchema.d.ts +75 -51
- package/schema/DatabaseSchema.js +355 -307
- package/schema/DatabaseTable.d.ts +96 -73
- package/schema/DatabaseTable.js +1012 -927
- package/schema/SchemaComparator.d.ts +71 -67
- package/schema/SchemaComparator.js +791 -740
- package/schema/SchemaHelper.d.ts +122 -96
- package/schema/SchemaHelper.js +682 -659
- package/schema/SqlSchemaGenerator.d.ts +79 -58
- package/schema/SqlSchemaGenerator.js +527 -501
- package/typings.d.ts +406 -271
|
@@ -1,47 +1,66 @@
|
|
|
1
|
-
import { type Dictionary, type Type } from '@mikro-orm/core';
|
|
1
|
+
import { type Dictionary, type Transaction, type Type } from '@mikro-orm/core';
|
|
2
2
|
import type { CheckDef, Column, ForeignKey, IndexDef, Table, TableDifference } from '../../typings.js';
|
|
3
3
|
import type { AbstractSqlConnection } from '../../AbstractSqlConnection.js';
|
|
4
4
|
import { SchemaHelper } from '../../schema/SchemaHelper.js';
|
|
5
5
|
import type { DatabaseSchema } from '../../schema/DatabaseSchema.js';
|
|
6
6
|
import type { DatabaseTable } from '../../schema/DatabaseTable.js';
|
|
7
7
|
export declare class MySqlSchemaHelper extends SchemaHelper {
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
8
|
+
#private;
|
|
9
|
+
static readonly DEFAULT_VALUES: {
|
|
10
|
+
'now()': string[];
|
|
11
|
+
'current_timestamp(?)': string[];
|
|
12
|
+
'0': string[];
|
|
13
|
+
};
|
|
14
|
+
getSchemaBeginning(charset: string, disableForeignKeys?: boolean): string;
|
|
15
|
+
disableForeignKeysSQL(): string;
|
|
16
|
+
enableForeignKeysSQL(): string;
|
|
17
|
+
finalizeTable(table: DatabaseTable, charset: string, collate?: string): string;
|
|
18
|
+
getListTablesSQL(): string;
|
|
19
|
+
getListViewsSQL(): string;
|
|
20
|
+
loadViews(
|
|
21
|
+
schema: DatabaseSchema,
|
|
22
|
+
connection: AbstractSqlConnection,
|
|
23
|
+
schemaName?: string,
|
|
24
|
+
ctx?: Transaction,
|
|
25
|
+
): Promise<void>;
|
|
26
|
+
loadInformationSchema(
|
|
27
|
+
schema: DatabaseSchema,
|
|
28
|
+
connection: AbstractSqlConnection,
|
|
29
|
+
tables: Table[],
|
|
30
|
+
schemas?: string[],
|
|
31
|
+
ctx?: Transaction,
|
|
32
|
+
): Promise<void>;
|
|
33
|
+
getAllIndexes(connection: AbstractSqlConnection, tables: Table[], ctx?: Transaction): Promise<Dictionary<IndexDef[]>>;
|
|
34
|
+
getCreateIndexSQL(tableName: string, index: IndexDef, partialExpression?: boolean): string;
|
|
35
|
+
/**
|
|
36
|
+
* Build the column list for a MySQL index, with MySQL-specific handling for collation.
|
|
37
|
+
* MySQL requires collation to be specified as an expression: (column_name COLLATE collation_name)
|
|
38
|
+
*/
|
|
39
|
+
protected getIndexColumns(index: IndexDef): string;
|
|
40
|
+
/**
|
|
41
|
+
* Append MySQL-specific index suffixes like INVISIBLE.
|
|
42
|
+
*/
|
|
43
|
+
protected appendMySqlIndexSuffix(sql: string, index: IndexDef): string;
|
|
44
|
+
getAllColumns(connection: AbstractSqlConnection, tables: Table[], ctx?: Transaction): Promise<Dictionary<Column[]>>;
|
|
45
|
+
getAllChecks(connection: AbstractSqlConnection, tables: Table[], ctx?: Transaction): Promise<Dictionary<CheckDef[]>>;
|
|
46
|
+
getAllForeignKeys(
|
|
47
|
+
connection: AbstractSqlConnection,
|
|
48
|
+
tables: Table[],
|
|
49
|
+
ctx?: Transaction,
|
|
50
|
+
): Promise<Dictionary<Dictionary<ForeignKey>>>;
|
|
51
|
+
getPreAlterTable(tableDiff: TableDifference, safe: boolean): string[];
|
|
52
|
+
getRenameColumnSQL(tableName: string, oldColumnName: string, to: Column): string;
|
|
53
|
+
getRenameIndexSQL(tableName: string, index: IndexDef, oldIndexName: string): string[];
|
|
54
|
+
getChangeColumnCommentSQL(tableName: string, to: Column, schemaName?: string): string;
|
|
55
|
+
alterTableColumn(column: Column, table: DatabaseTable, changedProperties: Set<string>): string[];
|
|
56
|
+
private getColumnDeclarationSQL;
|
|
57
|
+
getAllEnumDefinitions(
|
|
58
|
+
connection: AbstractSqlConnection,
|
|
59
|
+
tables: Table[],
|
|
60
|
+
ctx?: Transaction,
|
|
61
|
+
): Promise<Dictionary<Dictionary<string[]>>>;
|
|
62
|
+
private supportsCheckConstraints;
|
|
63
|
+
protected getChecksSQL(tables: Table[]): string;
|
|
64
|
+
normalizeDefaultValue(defaultValue: string, length: number): string | number;
|
|
65
|
+
protected wrap(val: string | null | undefined, type: Type<unknown>): string | null | undefined;
|
|
47
66
|
}
|