@mikro-orm/sql 7.0.4-dev.9 → 7.0.4

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 +94 -58
  2. package/AbstractSqlConnection.js +235 -238
  3. package/AbstractSqlDriver.d.ts +410 -155
  4. package/AbstractSqlDriver.js +2064 -1941
  5. package/AbstractSqlPlatform.d.ts +83 -73
  6. package/AbstractSqlPlatform.js +162 -158
  7. package/PivotCollectionPersister.d.ts +33 -15
  8. package/PivotCollectionPersister.js +158 -160
  9. package/README.md +1 -1
  10. package/SqlEntityManager.d.ts +67 -22
  11. package/SqlEntityManager.js +54 -38
  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 +192 -194
  16. package/dialects/mysql/BaseMySqlPlatform.d.ts +64 -45
  17. package/dialects/mysql/BaseMySqlPlatform.js +134 -131
  18. package/dialects/mysql/MySqlExceptionConverter.d.ts +6 -6
  19. package/dialects/mysql/MySqlExceptionConverter.js +91 -77
  20. package/dialects/mysql/MySqlNativeQueryBuilder.d.ts +3 -3
  21. package/dialects/mysql/MySqlNativeQueryBuilder.js +66 -69
  22. package/dialects/mysql/MySqlSchemaHelper.d.ts +39 -39
  23. package/dialects/mysql/MySqlSchemaHelper.js +327 -319
  24. package/dialects/oracledb/OracleDialect.d.ts +81 -52
  25. package/dialects/oracledb/OracleDialect.js +155 -149
  26. package/dialects/oracledb/OracleNativeQueryBuilder.d.ts +12 -12
  27. package/dialects/oracledb/OracleNativeQueryBuilder.js +232 -236
  28. package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +109 -105
  29. package/dialects/postgresql/BasePostgreSqlPlatform.js +354 -350
  30. package/dialects/postgresql/FullTextType.d.ts +10 -6
  31. package/dialects/postgresql/FullTextType.js +51 -51
  32. package/dialects/postgresql/PostgreSqlExceptionConverter.d.ts +5 -5
  33. package/dialects/postgresql/PostgreSqlExceptionConverter.js +55 -43
  34. package/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts +1 -1
  35. package/dialects/postgresql/PostgreSqlNativeQueryBuilder.js +4 -4
  36. package/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +102 -82
  37. package/dialects/postgresql/PostgreSqlSchemaHelper.js +733 -705
  38. package/dialects/sqlite/BaseSqliteConnection.d.ts +3 -5
  39. package/dialects/sqlite/BaseSqliteConnection.js +21 -19
  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 +67 -51
  46. package/dialects/sqlite/SqliteNativeQueryBuilder.d.ts +2 -2
  47. package/dialects/sqlite/SqliteNativeQueryBuilder.js +7 -7
  48. package/dialects/sqlite/SqlitePlatform.d.ts +63 -72
  49. package/dialects/sqlite/SqlitePlatform.js +139 -139
  50. package/dialects/sqlite/SqliteSchemaHelper.d.ts +70 -60
  51. package/dialects/sqlite/SqliteSchemaHelper.js +533 -520
  52. package/package.json +3 -3
  53. package/plugin/index.d.ts +42 -35
  54. package/plugin/index.js +43 -36
  55. package/plugin/transformer.d.ts +117 -94
  56. package/plugin/transformer.js +890 -881
  57. package/query/ArrayCriteriaNode.d.ts +4 -4
  58. package/query/ArrayCriteriaNode.js +18 -18
  59. package/query/CriteriaNode.d.ts +35 -25
  60. package/query/CriteriaNode.js +133 -123
  61. package/query/CriteriaNodeFactory.d.ts +49 -6
  62. package/query/CriteriaNodeFactory.js +97 -94
  63. package/query/NativeQueryBuilder.d.ts +118 -118
  64. package/query/NativeQueryBuilder.js +484 -480
  65. package/query/ObjectCriteriaNode.d.ts +12 -12
  66. package/query/ObjectCriteriaNode.js +298 -282
  67. package/query/QueryBuilder.d.ts +1557 -905
  68. package/query/QueryBuilder.js +2322 -2192
  69. package/query/QueryBuilderHelper.d.ts +153 -72
  70. package/query/QueryBuilderHelper.js +1079 -1028
  71. package/query/ScalarCriteriaNode.d.ts +3 -3
  72. package/query/ScalarCriteriaNode.js +53 -46
  73. package/query/enums.d.ts +14 -14
  74. package/query/enums.js +14 -14
  75. package/query/raw.d.ts +16 -6
  76. package/query/raw.js +10 -10
  77. package/schema/DatabaseSchema.d.ts +73 -50
  78. package/schema/DatabaseSchema.js +331 -307
  79. package/schema/DatabaseTable.d.ts +96 -73
  80. package/schema/DatabaseTable.js +1012 -927
  81. package/schema/SchemaComparator.d.ts +70 -66
  82. package/schema/SchemaComparator.js +766 -740
  83. package/schema/SchemaHelper.d.ts +109 -95
  84. package/schema/SchemaHelper.js +675 -659
  85. package/schema/SqlSchemaGenerator.d.ts +78 -58
  86. package/schema/SqlSchemaGenerator.js +535 -501
  87. package/typings.d.ts +380 -266
@@ -2,9 +2,7 @@ import { type Dialect } from 'kysely';
2
2
  import type { Dictionary } from '@mikro-orm/core';
3
3
  import { AbstractSqlConnection } from '../../AbstractSqlConnection.js';
4
4
  export declare class BaseSqliteConnection extends AbstractSqlConnection {
5
- createKyselyDialect(options: Dictionary): Dialect;
6
- connect(options?: {
7
- skipOnConnect?: boolean;
8
- }): Promise<void>;
9
- protected attachDatabases(): Promise<void>;
5
+ createKyselyDialect(options: Dictionary): Dialect;
6
+ connect(options?: { skipOnConnect?: boolean }): Promise<void>;
7
+ protected attachDatabases(): Promise<void>;
10
8
  }
@@ -1,25 +1,27 @@
1
1
  import { CompiledQuery } from 'kysely';
2
2
  import { AbstractSqlConnection } from '../../AbstractSqlConnection.js';
3
3
  export class BaseSqliteConnection extends AbstractSqlConnection {
4
- createKyselyDialect(options) {
5
- throw new Error('No SQLite dialect configured. Pass a Kysely dialect via the `driverOptions` config option, ' +
6
- 'e.g. `new NodeSqliteDialect(...)` for node:sqlite or a custom dialect for other libraries.');
4
+ createKyselyDialect(options) {
5
+ throw new Error(
6
+ 'No SQLite dialect configured. Pass a Kysely dialect via the `driverOptions` config option, ' +
7
+ 'e.g. `new NodeSqliteDialect(...)` for node:sqlite or a custom dialect for other libraries.',
8
+ );
9
+ }
10
+ async connect(options) {
11
+ await super.connect(options);
12
+ await this.getClient().executeQuery(CompiledQuery.raw('pragma foreign_keys = on'));
13
+ await this.attachDatabases();
14
+ }
15
+ async attachDatabases() {
16
+ const attachDatabases = this.config.get('attachDatabases');
17
+ if (!attachDatabases?.length) {
18
+ return;
7
19
  }
8
- async connect(options) {
9
- await super.connect(options);
10
- await this.getClient().executeQuery(CompiledQuery.raw('pragma foreign_keys = on'));
11
- await this.attachDatabases();
12
- }
13
- async attachDatabases() {
14
- const attachDatabases = this.config.get('attachDatabases');
15
- if (!attachDatabases?.length) {
16
- return;
17
- }
18
- const { fs } = await import('@mikro-orm/core/fs-utils');
19
- const baseDir = this.config.get('baseDir');
20
- for (const db of attachDatabases) {
21
- const path = fs.absolutePath(db.path, baseDir);
22
- await this.execute(`attach database '${path}' as ${this.platform.quoteIdentifier(db.name)}`);
23
- }
20
+ const { fs } = await import('@mikro-orm/core/fs-utils');
21
+ const baseDir = this.config.get('baseDir');
22
+ for (const db of attachDatabases) {
23
+ const path = fs.absolutePath(db.path, baseDir);
24
+ await this.execute(`attach database '${path}' as ${this.platform.quoteIdentifier(db.name)}`);
24
25
  }
26
+ }
25
27
  }
@@ -17,5 +17,5 @@ import { SqliteDialect } from 'kysely';
17
17
  * ```
18
18
  */
19
19
  export declare class NodeSqliteDialect extends SqliteDialect {
20
- constructor(dbName: string);
20
+ constructor(dbName: string);
21
21
  }
@@ -17,27 +17,27 @@ import { SqliteDialect } from 'kysely';
17
17
  * ```
18
18
  */
19
19
  export class NodeSqliteDialect extends SqliteDialect {
20
- constructor(dbName) {
21
- const { DatabaseSync } = globalThis.process.getBuiltinModule('node:sqlite');
22
- super({
23
- database: () => {
24
- const db = new DatabaseSync(dbName);
25
- return {
26
- prepare(sql) {
27
- const stmt = db.prepare(sql);
28
- return {
29
- reader: /^\s*(select|pragma|explain|with)/i.test(sql) || /\breturning\b/i.test(sql),
30
- all: (params) => stmt.all(...params),
31
- run: (params) => stmt.run(...params),
32
- /* v8 ignore next */
33
- get: (params) => stmt.get(...params),
34
- };
35
- },
36
- close() {
37
- db.close();
38
- },
39
- };
40
- },
41
- });
42
- }
20
+ constructor(dbName) {
21
+ const { DatabaseSync } = globalThis.process.getBuiltinModule('node:sqlite');
22
+ super({
23
+ database: () => {
24
+ const db = new DatabaseSync(dbName);
25
+ return {
26
+ prepare(sql) {
27
+ const stmt = db.prepare(sql);
28
+ return {
29
+ reader: /^\s*(select|pragma|explain|with)/i.test(sql) || /\breturning\b/i.test(sql),
30
+ all: params => stmt.all(...params),
31
+ run: params => stmt.run(...params),
32
+ /* v8 ignore next */
33
+ get: params => stmt.get(...params),
34
+ };
35
+ },
36
+ close() {
37
+ db.close();
38
+ },
39
+ };
40
+ },
41
+ });
42
+ }
43
43
  }
@@ -8,5 +8,5 @@ import { BaseSqliteConnection } from './BaseSqliteConnection.js';
8
8
  * For the default better-sqlite3 experience, use `@mikro-orm/sqlite` instead.
9
9
  */
10
10
  export declare class SqliteDriver extends AbstractSqlDriver<BaseSqliteConnection> {
11
- constructor(config: Configuration);
11
+ constructor(config: Configuration);
12
12
  }
@@ -8,7 +8,7 @@ import { SqlitePlatform } from './SqlitePlatform.js';
8
8
  * For the default better-sqlite3 experience, use `@mikro-orm/sqlite` instead.
9
9
  */
10
10
  export class SqliteDriver extends AbstractSqlDriver {
11
- constructor(config) {
12
- super(config, new SqlitePlatform(), BaseSqliteConnection, ['kysely']);
13
- }
11
+ constructor(config) {
12
+ super(config, new SqlitePlatform(), BaseSqliteConnection, ['kysely']);
13
+ }
14
14
  }
@@ -1,9 +1,9 @@
1
1
  import { ExceptionConverter, type Dictionary, type DriverException } from '@mikro-orm/core';
2
2
  export declare class SqliteExceptionConverter extends ExceptionConverter {
3
- /**
4
- * @inheritDoc
5
- * @see http://www.sqlite.org/c3ref/c_abort.html
6
- * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractSQLiteDriver.php
7
- */
8
- convertException(exception: Error & Dictionary): DriverException;
3
+ /**
4
+ * @inheritDoc
5
+ * @see http://www.sqlite.org/c3ref/c_abort.html
6
+ * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractSQLiteDriver.php
7
+ */
8
+ convertException(exception: Error & Dictionary): DriverException;
9
9
  }
@@ -1,54 +1,70 @@
1
- import { ConnectionException, ExceptionConverter, InvalidFieldNameException, LockWaitTimeoutException, NonUniqueFieldNameException, CheckConstraintViolationException, NotNullConstraintViolationException, ReadOnlyException, SyntaxErrorException, TableExistsException, TableNotFoundException, UniqueConstraintViolationException, ForeignKeyConstraintViolationException, } from '@mikro-orm/core';
1
+ import {
2
+ ConnectionException,
3
+ ExceptionConverter,
4
+ InvalidFieldNameException,
5
+ LockWaitTimeoutException,
6
+ NonUniqueFieldNameException,
7
+ CheckConstraintViolationException,
8
+ NotNullConstraintViolationException,
9
+ ReadOnlyException,
10
+ SyntaxErrorException,
11
+ TableExistsException,
12
+ TableNotFoundException,
13
+ UniqueConstraintViolationException,
14
+ ForeignKeyConstraintViolationException,
15
+ } from '@mikro-orm/core';
2
16
  export class SqliteExceptionConverter extends ExceptionConverter {
3
- /**
4
- * @inheritDoc
5
- * @see http://www.sqlite.org/c3ref/c_abort.html
6
- * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractSQLiteDriver.php
7
- */
8
- convertException(exception) {
9
- /* v8 ignore next */
10
- if (exception.message.includes('database is locked')) {
11
- return new LockWaitTimeoutException(exception);
12
- }
13
- if (exception.message.includes('must be unique') ||
14
- exception.message.includes('is not unique') ||
15
- exception.message.includes('are not unique') ||
16
- exception.message.includes('UNIQUE constraint failed')) {
17
- return new UniqueConstraintViolationException(exception);
18
- }
19
- if (exception.message.includes('may not be NULL') || exception.message.includes('NOT NULL constraint failed')) {
20
- return new NotNullConstraintViolationException(exception);
21
- }
22
- /* v8 ignore next */
23
- if (exception.message.includes('CHECK constraint failed')) {
24
- return new CheckConstraintViolationException(exception);
25
- }
26
- if (exception.message.includes('no such table:')) {
27
- return new TableNotFoundException(exception);
28
- }
29
- if (exception.message.includes('already exists')) {
30
- return new TableExistsException(exception);
31
- }
32
- if (exception.message.includes('no such column:')) {
33
- return new InvalidFieldNameException(exception);
34
- }
35
- if (exception.message.includes('ambiguous column name')) {
36
- return new NonUniqueFieldNameException(exception);
37
- }
38
- if (exception.message.includes('syntax error')) {
39
- return new SyntaxErrorException(exception);
40
- }
41
- /* v8 ignore next */
42
- if (exception.message.includes('attempt to write a readonly database')) {
43
- return new ReadOnlyException(exception);
44
- }
45
- /* v8 ignore next */
46
- if (exception.message.includes('unable to open database file')) {
47
- return new ConnectionException(exception);
48
- }
49
- if (exception.message.includes('FOREIGN KEY constraint failed')) {
50
- return new ForeignKeyConstraintViolationException(exception);
51
- }
52
- return super.convertException(exception);
17
+ /**
18
+ * @inheritDoc
19
+ * @see http://www.sqlite.org/c3ref/c_abort.html
20
+ * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractSQLiteDriver.php
21
+ */
22
+ convertException(exception) {
23
+ /* v8 ignore next */
24
+ if (exception.message.includes('database is locked')) {
25
+ return new LockWaitTimeoutException(exception);
53
26
  }
27
+ if (
28
+ exception.message.includes('must be unique') ||
29
+ exception.message.includes('is not unique') ||
30
+ exception.message.includes('are not unique') ||
31
+ exception.message.includes('UNIQUE constraint failed')
32
+ ) {
33
+ return new UniqueConstraintViolationException(exception);
34
+ }
35
+ if (exception.message.includes('may not be NULL') || exception.message.includes('NOT NULL constraint failed')) {
36
+ return new NotNullConstraintViolationException(exception);
37
+ }
38
+ /* v8 ignore next */
39
+ if (exception.message.includes('CHECK constraint failed')) {
40
+ return new CheckConstraintViolationException(exception);
41
+ }
42
+ if (exception.message.includes('no such table:')) {
43
+ return new TableNotFoundException(exception);
44
+ }
45
+ if (exception.message.includes('already exists')) {
46
+ return new TableExistsException(exception);
47
+ }
48
+ if (exception.message.includes('no such column:')) {
49
+ return new InvalidFieldNameException(exception);
50
+ }
51
+ if (exception.message.includes('ambiguous column name')) {
52
+ return new NonUniqueFieldNameException(exception);
53
+ }
54
+ if (exception.message.includes('syntax error')) {
55
+ return new SyntaxErrorException(exception);
56
+ }
57
+ /* v8 ignore next */
58
+ if (exception.message.includes('attempt to write a readonly database')) {
59
+ return new ReadOnlyException(exception);
60
+ }
61
+ /* v8 ignore next */
62
+ if (exception.message.includes('unable to open database file')) {
63
+ return new ConnectionException(exception);
64
+ }
65
+ if (exception.message.includes('FOREIGN KEY constraint failed')) {
66
+ return new ForeignKeyConstraintViolationException(exception);
67
+ }
68
+ return super.convertException(exception);
69
+ }
54
70
  }
@@ -1,6 +1,6 @@
1
1
  import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js';
2
2
  /** @internal */
3
3
  export declare class SqliteNativeQueryBuilder extends NativeQueryBuilder {
4
- protected compileTruncate(): void;
5
- protected addLockClause(): void;
4
+ protected compileTruncate(): void;
5
+ protected addLockClause(): void;
6
6
  }
@@ -1,11 +1,11 @@
1
1
  import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js';
2
2
  /** @internal */
3
3
  export class SqliteNativeQueryBuilder extends NativeQueryBuilder {
4
- compileTruncate() {
5
- const sql = `delete from ${this.getTableName()}`;
6
- this.parts.push(sql);
7
- }
8
- addLockClause() {
9
- return; // not supported
10
- }
4
+ compileTruncate() {
5
+ const sql = `delete from ${this.getTableName()}`;
6
+ this.parts.push(sql);
7
+ }
8
+ addLockClause() {
9
+ return; // not supported
10
+ }
11
11
  }
@@ -4,77 +4,68 @@ import { SqliteNativeQueryBuilder } from './SqliteNativeQueryBuilder.js';
4
4
  import { SqliteSchemaHelper } from './SqliteSchemaHelper.js';
5
5
  import { SqliteExceptionConverter } from './SqliteExceptionConverter.js';
6
6
  export declare class SqlitePlatform extends AbstractSqlPlatform {
7
- protected readonly schemaHelper: SqliteSchemaHelper;
8
- protected readonly exceptionConverter: SqliteExceptionConverter;
9
- /** @internal */
10
- createNativeQueryBuilder(): SqliteNativeQueryBuilder;
11
- usesDefaultKeyword(): boolean;
12
- usesReturningStatement(): boolean;
13
- usesEnumCheckConstraints(): boolean;
14
- getCurrentTimestampSQL(length: number): string;
15
- getDateTimeTypeDeclarationSQL(column: {
16
- length: number;
17
- }): string;
18
- getBeginTransactionSQL(options?: {
19
- isolationLevel?: IsolationLevel;
20
- readOnly?: boolean;
21
- }): string[];
22
- getEnumTypeDeclarationSQL(column: {
23
- items?: unknown[];
24
- fieldNames: string[];
25
- length?: number;
26
- unsigned?: boolean;
27
- autoincrement?: boolean;
28
- }): string;
29
- getTinyIntTypeDeclarationSQL(column: {
30
- length?: number;
31
- unsigned?: boolean;
32
- autoincrement?: boolean;
33
- }): string;
34
- getSmallIntTypeDeclarationSQL(column: {
35
- length?: number;
36
- unsigned?: boolean;
37
- autoincrement?: boolean;
38
- }): string;
39
- getIntegerTypeDeclarationSQL(column: {
40
- length?: number;
41
- unsigned?: boolean;
42
- autoincrement?: boolean;
43
- }): string;
44
- getFloatDeclarationSQL(): string;
45
- getBooleanTypeDeclarationSQL(): string;
46
- getCharTypeDeclarationSQL(column: {
47
- length?: number;
48
- }): string;
49
- getVarcharTypeDeclarationSQL(column: {
50
- length?: number;
51
- }): string;
52
- normalizeColumnType(type: string, options: {
53
- length?: number;
54
- precision?: number;
55
- scale?: number;
56
- }): string;
57
- convertsJsonAutomatically(): boolean;
58
- /**
59
- * This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite.
60
- * We use this method to convert Dates to timestamps when computing the changeset, so we have the right
61
- * data type in the payload as well as in original entity data. Without that, we would end up with diffs
62
- * including all Date properties, as we would be comparing Date object with timestamp.
63
- */
64
- processDateProperty(value: unknown): string | number | Date;
65
- getIndexName(tableName: string, columns: string[], type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence'): string;
66
- supportsDeferredUniqueConstraints(): boolean;
67
- /**
68
- * SQLite supports schemas via ATTACH DATABASE. Returns true when there are
69
- * attached databases configured.
70
- */
71
- supportsSchemas(): boolean;
72
- getDefaultSchemaName(): string | undefined;
73
- getFullTextWhereClause(): string;
74
- escape(value: any): string;
75
- convertVersionValue(value: Date | number, prop: EntityProperty): number | {
7
+ protected readonly schemaHelper: SqliteSchemaHelper;
8
+ protected readonly exceptionConverter: SqliteExceptionConverter;
9
+ /** @internal */
10
+ createNativeQueryBuilder(): SqliteNativeQueryBuilder;
11
+ usesDefaultKeyword(): boolean;
12
+ usesReturningStatement(): boolean;
13
+ usesEnumCheckConstraints(): boolean;
14
+ getCurrentTimestampSQL(length: number): string;
15
+ getDateTimeTypeDeclarationSQL(column: { length: number }): string;
16
+ getBeginTransactionSQL(options?: { isolationLevel?: IsolationLevel; readOnly?: boolean }): string[];
17
+ getEnumTypeDeclarationSQL(column: {
18
+ items?: unknown[];
19
+ fieldNames: string[];
20
+ length?: number;
21
+ unsigned?: boolean;
22
+ autoincrement?: boolean;
23
+ }): string;
24
+ getTinyIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string;
25
+ getSmallIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string;
26
+ getIntegerTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string;
27
+ getFloatDeclarationSQL(): string;
28
+ getBooleanTypeDeclarationSQL(): string;
29
+ getCharTypeDeclarationSQL(column: { length?: number }): string;
30
+ getVarcharTypeDeclarationSQL(column: { length?: number }): string;
31
+ normalizeColumnType(
32
+ type: string,
33
+ options: {
34
+ length?: number;
35
+ precision?: number;
36
+ scale?: number;
37
+ },
38
+ ): string;
39
+ convertsJsonAutomatically(): boolean;
40
+ /**
41
+ * This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite.
42
+ * We use this method to convert Dates to timestamps when computing the changeset, so we have the right
43
+ * data type in the payload as well as in original entity data. Without that, we would end up with diffs
44
+ * including all Date properties, as we would be comparing Date object with timestamp.
45
+ */
46
+ processDateProperty(value: unknown): string | number | Date;
47
+ getIndexName(
48
+ tableName: string,
49
+ columns: string[],
50
+ type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence',
51
+ ): string;
52
+ supportsDeferredUniqueConstraints(): boolean;
53
+ /**
54
+ * SQLite supports schemas via ATTACH DATABASE. Returns true when there are
55
+ * attached databases configured.
56
+ */
57
+ supportsSchemas(): boolean;
58
+ getDefaultSchemaName(): string | undefined;
59
+ getFullTextWhereClause(): string;
60
+ escape(value: any): string;
61
+ convertVersionValue(
62
+ value: Date | number,
63
+ prop: EntityProperty,
64
+ ):
65
+ | number
66
+ | {
76
67
  $in: (string | number)[];
77
- };
78
- getJsonArrayElementPropertySQL(alias: string, property: string, _type: string): string;
79
- quoteValue(value: any): string;
68
+ };
69
+ getJsonArrayElementPropertySQL(alias: string, property: string, _type: string): string;
70
+ quoteValue(value: any): string;
80
71
  }