@mikro-orm/sql 7.0.3-dev.9 → 7.0.3
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 +2064 -1937
- package/AbstractSqlPlatform.d.ts +83 -73
- package/AbstractSqlPlatform.js +162 -158
- package/PivotCollectionPersister.d.ts +33 -15
- package/PivotCollectionPersister.js +158 -160
- package/README.md +2 -2
- 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 +192 -194
- package/dialects/mysql/BaseMySqlPlatform.d.ts +64 -45
- package/dialects/mysql/BaseMySqlPlatform.js +134 -131
- 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 +39 -39
- 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 +232 -236
- package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +108 -105
- package/dialects/postgresql/BasePostgreSqlPlatform.js +351 -350
- 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 +102 -82
- package/dialects/postgresql/PostgreSqlSchemaHelper.js +733 -683
- 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 +70 -60
- package/dialects/sqlite/SqliteSchemaHelper.js +533 -520
- package/package.json +3 -3
- 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 +118 -118
- package/query/NativeQueryBuilder.js +484 -480
- package/query/ObjectCriteriaNode.d.ts +12 -12
- package/query/ObjectCriteriaNode.js +298 -282
- package/query/QueryBuilder.d.ts +1546 -904
- package/query/QueryBuilder.js +2294 -2144
- 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 +73 -50
- package/schema/DatabaseSchema.js +331 -307
- package/schema/DatabaseTable.d.ts +96 -73
- package/schema/DatabaseTable.js +1012 -927
- package/schema/SchemaComparator.d.ts +70 -66
- package/schema/SchemaComparator.js +766 -740
- package/schema/SchemaHelper.d.ts +109 -95
- package/schema/SchemaHelper.js +675 -659
- package/schema/SqlSchemaGenerator.d.ts +78 -58
- package/schema/SqlSchemaGenerator.js +535 -501
- package/typings.d.ts +380 -266
|
@@ -1,112 +1,115 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type EntityProperty,
|
|
3
|
+
type IsolationLevel,
|
|
4
|
+
RawQueryFragment,
|
|
5
|
+
type SimpleColumnMeta,
|
|
6
|
+
Type,
|
|
7
|
+
} from '@mikro-orm/core';
|
|
2
8
|
import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js';
|
|
3
9
|
import type { IndexDef } from '../../typings.js';
|
|
4
10
|
import { PostgreSqlNativeQueryBuilder } from './PostgreSqlNativeQueryBuilder.js';
|
|
5
11
|
import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js';
|
|
6
12
|
import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js';
|
|
7
13
|
export declare class BasePostgreSqlPlatform extends AbstractSqlPlatform {
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}[]): string;
|
|
110
|
-
getJsonArrayElementPropertySQL(alias: string, property: string, type: string): string;
|
|
111
|
-
getDefaultClientUrl(): string;
|
|
14
|
+
#private;
|
|
15
|
+
protected readonly schemaHelper: PostgreSqlSchemaHelper;
|
|
16
|
+
protected readonly exceptionConverter: PostgreSqlExceptionConverter;
|
|
17
|
+
createNativeQueryBuilder(): PostgreSqlNativeQueryBuilder;
|
|
18
|
+
usesReturningStatement(): boolean;
|
|
19
|
+
usesCascadeStatement(): boolean;
|
|
20
|
+
supportsNativeEnums(): boolean;
|
|
21
|
+
usesEnumCheckConstraints(): boolean;
|
|
22
|
+
supportsMaterializedViews(): boolean;
|
|
23
|
+
supportsCustomPrimaryKeyNames(): boolean;
|
|
24
|
+
getCurrentTimestampSQL(length: number): string;
|
|
25
|
+
getDateTimeTypeDeclarationSQL(column: { length?: number }): string;
|
|
26
|
+
getDefaultDateTimeLength(): number;
|
|
27
|
+
getTimeTypeDeclarationSQL(): string;
|
|
28
|
+
getIntegerTypeDeclarationSQL(column: { length?: number; autoincrement?: boolean; generated?: string }): string;
|
|
29
|
+
getBigIntTypeDeclarationSQL(column: { autoincrement?: boolean }): string;
|
|
30
|
+
getTinyIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string;
|
|
31
|
+
getUuidTypeDeclarationSQL(column: { length?: number }): string;
|
|
32
|
+
getFullTextWhereClause(prop: EntityProperty): string;
|
|
33
|
+
supportsCreatingFullTextIndex(): boolean;
|
|
34
|
+
getFullTextIndexExpression(
|
|
35
|
+
indexName: string,
|
|
36
|
+
schemaName: string | undefined,
|
|
37
|
+
tableName: string,
|
|
38
|
+
columns: SimpleColumnMeta[],
|
|
39
|
+
): string;
|
|
40
|
+
normalizeColumnType(
|
|
41
|
+
type: string,
|
|
42
|
+
options: {
|
|
43
|
+
length?: number;
|
|
44
|
+
precision?: number;
|
|
45
|
+
scale?: number;
|
|
46
|
+
autoincrement?: boolean;
|
|
47
|
+
},
|
|
48
|
+
): string;
|
|
49
|
+
getMappedType(type: string): Type<unknown>;
|
|
50
|
+
getRegExpOperator(val?: unknown, flags?: string): string;
|
|
51
|
+
getRegExpValue(val: RegExp): {
|
|
52
|
+
$re: string;
|
|
53
|
+
$flags?: string;
|
|
54
|
+
};
|
|
55
|
+
isBigIntProperty(prop: EntityProperty): boolean;
|
|
56
|
+
getArrayDeclarationSQL(): string;
|
|
57
|
+
getFloatDeclarationSQL(): string;
|
|
58
|
+
getDoubleDeclarationSQL(): string;
|
|
59
|
+
getEnumTypeDeclarationSQL(column: { fieldNames: string[]; items?: unknown[]; nativeEnumName?: string }): string;
|
|
60
|
+
supportsMultipleStatements(): boolean;
|
|
61
|
+
getBeginTransactionSQL(options?: { isolationLevel?: IsolationLevel; readOnly?: boolean }): string[];
|
|
62
|
+
marshallArray(values: string[]): string;
|
|
63
|
+
unmarshallArray(value: string): string[];
|
|
64
|
+
getVarcharTypeDeclarationSQL(column: { length?: number }): string;
|
|
65
|
+
getCharTypeDeclarationSQL(column: { length?: number }): string;
|
|
66
|
+
getIntervalTypeDeclarationSQL(column: { length?: number }): string;
|
|
67
|
+
getBlobDeclarationSQL(): string;
|
|
68
|
+
getJsonDeclarationSQL(): string;
|
|
69
|
+
getSearchJsonPropertyKey(
|
|
70
|
+
path: string[],
|
|
71
|
+
type: string | undefined | Type,
|
|
72
|
+
aliased: boolean,
|
|
73
|
+
value?: unknown,
|
|
74
|
+
): string | RawQueryFragment;
|
|
75
|
+
getJsonIndexDefinition(index: IndexDef): string[];
|
|
76
|
+
quoteIdentifier(
|
|
77
|
+
id:
|
|
78
|
+
| string
|
|
79
|
+
| {
|
|
80
|
+
toString: () => string;
|
|
81
|
+
},
|
|
82
|
+
quote?: string,
|
|
83
|
+
): string;
|
|
84
|
+
private pad;
|
|
85
|
+
/** @internal */
|
|
86
|
+
formatDate(date: Date): string;
|
|
87
|
+
indexForeignKeys(): boolean;
|
|
88
|
+
getDefaultMappedType(type: string): Type<unknown>;
|
|
89
|
+
supportsSchemas(): boolean;
|
|
90
|
+
getDefaultSchemaName(): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the default name of index for the given columns
|
|
93
|
+
* cannot go past 63 character length for identifiers in MySQL
|
|
94
|
+
*/
|
|
95
|
+
getIndexName(
|
|
96
|
+
tableName: string,
|
|
97
|
+
columns: string[],
|
|
98
|
+
type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence',
|
|
99
|
+
): string;
|
|
100
|
+
getDefaultPrimaryName(tableName: string, columns: string[]): string;
|
|
101
|
+
/**
|
|
102
|
+
* @inheritDoc
|
|
103
|
+
*/
|
|
104
|
+
castColumn(prop?: { columnTypes?: string[] }): string;
|
|
105
|
+
getJsonArrayFromSQL(
|
|
106
|
+
column: string,
|
|
107
|
+
alias: string,
|
|
108
|
+
_properties: {
|
|
109
|
+
name: string;
|
|
110
|
+
type: string;
|
|
111
|
+
}[],
|
|
112
|
+
): string;
|
|
113
|
+
getJsonArrayElementPropertySQL(alias: string, property: string, type: string): string;
|
|
114
|
+
getDefaultClientUrl(): string;
|
|
112
115
|
}
|