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