@mikro-orm/sql 7.0.2 → 7.0.3-dev.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/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 +54 -58
- package/schema/SchemaComparator.js +719 -745
- 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
|
@@ -4,7 +4,7 @@ import type { ICriteriaNodeProcessOptions, IQueryBuilder } from '../typings.js';
|
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
6
|
export declare class ScalarCriteriaNode<T extends object> extends CriteriaNode<T> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
process(qb: IQueryBuilder<T>, options?: ICriteriaNodeProcessOptions): any;
|
|
8
|
+
willAutoJoin(qb: IQueryBuilder<T>, alias?: string, options?: ICriteriaNodeProcessOptions): boolean;
|
|
9
|
+
private shouldJoin;
|
|
10
10
|
}
|
|
@@ -6,60 +6,53 @@ import { QueryBuilder } from './QueryBuilder.js';
|
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export class ScalarCriteriaNode extends CriteriaNode {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
process(qb, options) {
|
|
10
|
+
const matchPopulateJoins = options?.matchPopulateJoins ||
|
|
11
|
+
(this.prop && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind));
|
|
12
|
+
const nestedAlias = qb.getAliasForJoinPath(this.getPath(options), { ...options, matchPopulateJoins });
|
|
13
|
+
if (this.shouldJoin(qb, nestedAlias)) {
|
|
14
|
+
const path = this.getPath();
|
|
15
|
+
const parentPath = this.parent.getPath(); // the parent is always there, otherwise `shouldJoin` would return `false`
|
|
16
|
+
const nestedAlias = qb.getAliasForJoinPath(path) || qb.getNextAlias(this.prop?.pivotEntity ?? this.entityName);
|
|
17
|
+
const field = this.aliased(this.prop.name, options?.alias);
|
|
18
|
+
const type = this.prop.kind === ReferenceKind.MANY_TO_MANY ? JoinType.pivotJoin : JoinType.leftJoin;
|
|
19
|
+
qb.join(field, nestedAlias, undefined, type, path);
|
|
20
|
+
// select the owner as virtual property when joining from 1:1 inverse side, but only if the parent is root entity
|
|
21
|
+
if (this.prop.kind === ReferenceKind.ONE_TO_ONE &&
|
|
22
|
+
!parentPath.includes('.') &&
|
|
23
|
+
!qb.state.fields?.includes(field)) {
|
|
24
|
+
qb.addSelect(field);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (this.payload instanceof QueryBuilder) {
|
|
28
|
+
return this.payload.toRaw();
|
|
29
|
+
}
|
|
30
|
+
if (this.payload && typeof this.payload === 'object') {
|
|
31
|
+
const keys = Object.keys(this.payload).filter(key => ARRAY_OPERATORS.includes(key) && Array.isArray(this.payload[key]));
|
|
32
|
+
for (const key of keys) {
|
|
33
|
+
this.payload[key] = JSON.stringify(this.payload[key]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return this.payload;
|
|
29
37
|
}
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
willAutoJoin(qb, alias, options) {
|
|
39
|
+
return this.shouldJoin(qb, alias);
|
|
32
40
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
shouldJoin(qb, nestedAlias) {
|
|
42
|
+
if (!this.parent ||
|
|
43
|
+
!this.prop ||
|
|
44
|
+
(nestedAlias && [QueryType.SELECT, QueryType.COUNT].includes(qb.type ?? QueryType.SELECT))) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
switch (this.prop.kind) {
|
|
48
|
+
case ReferenceKind.ONE_TO_MANY:
|
|
49
|
+
return true;
|
|
50
|
+
case ReferenceKind.MANY_TO_MANY:
|
|
51
|
+
return true;
|
|
52
|
+
case ReferenceKind.ONE_TO_ONE:
|
|
53
|
+
return !this.prop.owner;
|
|
54
|
+
default:
|
|
55
|
+
return false; // SCALAR, MANY_TO_ONE
|
|
56
|
+
}
|
|
40
57
|
}
|
|
41
|
-
return this.payload;
|
|
42
|
-
}
|
|
43
|
-
willAutoJoin(qb, alias, options) {
|
|
44
|
-
return this.shouldJoin(qb, alias);
|
|
45
|
-
}
|
|
46
|
-
shouldJoin(qb, nestedAlias) {
|
|
47
|
-
if (
|
|
48
|
-
!this.parent ||
|
|
49
|
-
!this.prop ||
|
|
50
|
-
(nestedAlias && [QueryType.SELECT, QueryType.COUNT].includes(qb.type ?? QueryType.SELECT))
|
|
51
|
-
) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
switch (this.prop.kind) {
|
|
55
|
-
case ReferenceKind.ONE_TO_MANY:
|
|
56
|
-
return true;
|
|
57
|
-
case ReferenceKind.MANY_TO_MANY:
|
|
58
|
-
return true;
|
|
59
|
-
case ReferenceKind.ONE_TO_ONE:
|
|
60
|
-
return !this.prop.owner;
|
|
61
|
-
default:
|
|
62
|
-
return false; // SCALAR, MANY_TO_ONE
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
58
|
}
|
package/query/enums.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/** Type of SQL query to be generated. */
|
|
2
2
|
export declare enum QueryType {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
TRUNCATE = "TRUNCATE",
|
|
4
|
+
SELECT = "SELECT",
|
|
5
|
+
COUNT = "COUNT",
|
|
6
|
+
INSERT = "INSERT",
|
|
7
|
+
UPDATE = "UPDATE",
|
|
8
|
+
DELETE = "DELETE",
|
|
9
|
+
UPSERT = "UPSERT"
|
|
10
10
|
}
|
|
11
11
|
/** Operators that apply to the embedded array column itself, not to individual elements. */
|
|
12
12
|
export declare const EMBEDDABLE_ARRAY_OPS: string[];
|
|
13
13
|
/** Type of SQL JOIN clause. */
|
|
14
14
|
export declare enum JoinType {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
leftJoin = "left join",
|
|
16
|
+
innerJoin = "inner join",
|
|
17
|
+
nestedLeftJoin = "nested left join",
|
|
18
|
+
nestedInnerJoin = "nested inner join",
|
|
19
|
+
pivotJoin = "pivot join",
|
|
20
|
+
innerJoinLateral = "inner join lateral",
|
|
21
|
+
leftJoinLateral = "left join lateral"
|
|
22
22
|
}
|
package/query/enums.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/** Type of SQL query to be generated. */
|
|
2
2
|
export var QueryType;
|
|
3
3
|
(function (QueryType) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
QueryType["TRUNCATE"] = "TRUNCATE";
|
|
5
|
+
QueryType["SELECT"] = "SELECT";
|
|
6
|
+
QueryType["COUNT"] = "COUNT";
|
|
7
|
+
QueryType["INSERT"] = "INSERT";
|
|
8
|
+
QueryType["UPDATE"] = "UPDATE";
|
|
9
|
+
QueryType["DELETE"] = "DELETE";
|
|
10
|
+
QueryType["UPSERT"] = "UPSERT";
|
|
11
11
|
})(QueryType || (QueryType = {}));
|
|
12
12
|
/** Operators that apply to the embedded array column itself, not to individual elements. */
|
|
13
13
|
export const EMBEDDABLE_ARRAY_OPS = ['$contains', '$contained', '$overlap'];
|
|
14
14
|
/** Type of SQL JOIN clause. */
|
|
15
15
|
export var JoinType;
|
|
16
16
|
(function (JoinType) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
JoinType["leftJoin"] = "left join";
|
|
18
|
+
JoinType["innerJoin"] = "inner join";
|
|
19
|
+
JoinType["nestedLeftJoin"] = "nested left join";
|
|
20
|
+
JoinType["nestedInnerJoin"] = "nested inner join";
|
|
21
|
+
JoinType["pivotJoin"] = "pivot join";
|
|
22
|
+
JoinType["innerJoinLateral"] = "inner join lateral";
|
|
23
|
+
JoinType["leftJoinLateral"] = "left join lateral";
|
|
24
24
|
})(JoinType || (JoinType = {}));
|
package/query/raw.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { type AnyString, type Dictionary, type EntityKey, type RawQueryFragment
|
|
|
2
2
|
import type { SelectQueryBuilder as KyselySelectQueryBuilder } from 'kysely';
|
|
3
3
|
/** @internal Type for QueryBuilder instances passed to raw() - uses toRaw to distinguish from Kysely QueryBuilder */
|
|
4
4
|
type QueryBuilderLike = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
toQuery(): {
|
|
6
|
+
sql: string;
|
|
7
|
+
params: readonly unknown[];
|
|
8
|
+
};
|
|
9
|
+
toRaw(): RawQueryFragment;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented
|
|
@@ -63,15 +63,5 @@ type QueryBuilderLike = {
|
|
|
63
63
|
* export class Author { ... }
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
export declare function raw<R = RawQueryFragment & symbol, T extends object = any>(
|
|
67
|
-
sql:
|
|
68
|
-
| QueryBuilderLike
|
|
69
|
-
| KyselySelectQueryBuilder<any, any, any>
|
|
70
|
-
| EntityKey<T>
|
|
71
|
-
| EntityKey<T>[]
|
|
72
|
-
| AnyString
|
|
73
|
-
| ((alias: string) => string)
|
|
74
|
-
| RawQueryFragment,
|
|
75
|
-
params?: readonly unknown[] | Dictionary<unknown>,
|
|
76
|
-
): R;
|
|
66
|
+
export declare function raw<R = RawQueryFragment & symbol, T extends object = any>(sql: QueryBuilderLike | KyselySelectQueryBuilder<any, any, any> | EntityKey<T> | EntityKey<T>[] | AnyString | ((alias: string) => string) | RawQueryFragment, params?: readonly unknown[] | Dictionary<unknown>): R;
|
|
77
67
|
export {};
|
package/query/raw.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { raw as raw_, Utils } from '@mikro-orm/core';
|
|
1
|
+
import { raw as raw_, Utils, } from '@mikro-orm/core';
|
|
2
2
|
/**
|
|
3
3
|
* Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented
|
|
4
4
|
* by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value
|
|
@@ -55,13 +55,13 @@ import { raw as raw_, Utils } from '@mikro-orm/core';
|
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
57
|
export function raw(sql, params) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
if (Utils.isObject(sql) && 'compile' in sql) {
|
|
59
|
+
const query = sql.compile();
|
|
60
|
+
return raw_(query.sql, query.parameters);
|
|
61
|
+
}
|
|
62
|
+
if (Utils.isObject(sql) && 'toQuery' in sql) {
|
|
63
|
+
const query = sql.toQuery();
|
|
64
|
+
return raw_(query.sql, query.params);
|
|
65
|
+
}
|
|
66
|
+
return raw_(sql, params);
|
|
67
67
|
}
|
|
@@ -7,77 +7,54 @@ import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js';
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export declare class DatabaseSchema {
|
|
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
|
-
skipTables?: (string | RegExp)[],
|
|
61
|
-
skipViews?: (string | RegExp)[],
|
|
62
|
-
): Promise<DatabaseSchema>;
|
|
63
|
-
static fromMetadata(
|
|
64
|
-
metadata: EntityMetadata[],
|
|
65
|
-
platform: AbstractSqlPlatform,
|
|
66
|
-
config: Configuration,
|
|
67
|
-
schemaName?: string,
|
|
68
|
-
em?: any,
|
|
69
|
-
): DatabaseSchema;
|
|
70
|
-
private static getViewDefinition;
|
|
71
|
-
private static getSchemaName;
|
|
72
|
-
/**
|
|
73
|
-
* Add a foreign key from a TPT child entity's PK to its parent entity's PK.
|
|
74
|
-
* This FK uses ON DELETE CASCADE to ensure child rows are deleted when parent is deleted.
|
|
75
|
-
*/
|
|
76
|
-
private static addTPTForeignKey;
|
|
77
|
-
private static matchName;
|
|
78
|
-
private static isNameAllowed;
|
|
79
|
-
private static isTableNameAllowed;
|
|
80
|
-
private static shouldHaveColumn;
|
|
81
|
-
toJSON(): Dictionary;
|
|
82
|
-
prune(schema: string | undefined, wildcardSchemaTables: string[]): void;
|
|
10
|
+
#private;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
constructor(platform: AbstractSqlPlatform, name: string);
|
|
13
|
+
addTable(name: string, schema: string | undefined | null, comment?: string): DatabaseTable;
|
|
14
|
+
getTables(): DatabaseTable[];
|
|
15
|
+
/** @internal */
|
|
16
|
+
setTables(tables: DatabaseTable[]): void;
|
|
17
|
+
/** @internal */
|
|
18
|
+
setNamespaces(namespaces: Set<string>): void;
|
|
19
|
+
getTable(name: string): DatabaseTable | undefined;
|
|
20
|
+
hasTable(name: string): boolean;
|
|
21
|
+
addView(name: string, schema: string | undefined | null, definition: string, materialized?: boolean, withData?: boolean): DatabaseView;
|
|
22
|
+
getViews(): DatabaseView[];
|
|
23
|
+
/** @internal */
|
|
24
|
+
setViews(views: DatabaseView[]): void;
|
|
25
|
+
getView(name: string): DatabaseView | undefined;
|
|
26
|
+
hasView(name: string): boolean;
|
|
27
|
+
setNativeEnums(nativeEnums: Dictionary<{
|
|
28
|
+
name: string;
|
|
29
|
+
schema?: string;
|
|
30
|
+
items: string[];
|
|
31
|
+
}>): void;
|
|
32
|
+
getNativeEnums(): Dictionary<{
|
|
33
|
+
name: string;
|
|
34
|
+
schema?: string;
|
|
35
|
+
items: string[];
|
|
36
|
+
}>;
|
|
37
|
+
getNativeEnum(name: string): {
|
|
38
|
+
name: string;
|
|
39
|
+
schema?: string;
|
|
40
|
+
items: string[];
|
|
41
|
+
};
|
|
42
|
+
hasNamespace(namespace: string): boolean;
|
|
43
|
+
hasNativeEnum(name: string): boolean;
|
|
44
|
+
getNamespaces(): string[];
|
|
45
|
+
static create(connection: AbstractSqlConnection, platform: AbstractSqlPlatform, config: Configuration, schemaName?: string, schemas?: string[], takeTables?: (string | RegExp)[], skipTables?: (string | RegExp)[], skipViews?: (string | RegExp)[]): Promise<DatabaseSchema>;
|
|
46
|
+
static fromMetadata(metadata: EntityMetadata[], platform: AbstractSqlPlatform, config: Configuration, schemaName?: string, em?: any): DatabaseSchema;
|
|
47
|
+
private static getViewDefinition;
|
|
48
|
+
private static getSchemaName;
|
|
49
|
+
/**
|
|
50
|
+
* Add a foreign key from a TPT child entity's PK to its parent entity's PK.
|
|
51
|
+
* This FK uses ON DELETE CASCADE to ensure child rows are deleted when parent is deleted.
|
|
52
|
+
*/
|
|
53
|
+
private static addTPTForeignKey;
|
|
54
|
+
private static matchName;
|
|
55
|
+
private static isNameAllowed;
|
|
56
|
+
private static isTableNameAllowed;
|
|
57
|
+
private static shouldHaveColumn;
|
|
58
|
+
toJSON(): Dictionary;
|
|
59
|
+
prune(schema: string | undefined, wildcardSchemaTables: string[]): void;
|
|
83
60
|
}
|