@mikro-orm/sql 7.0.9 → 7.0.10-dev.1

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
@@ -2,7 +2,9 @@ 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?: { skipOnConnect?: boolean }): Promise<void>;
7
- protected attachDatabases(): Promise<void>;
5
+ createKyselyDialect(options: Dictionary): Dialect;
6
+ connect(options?: {
7
+ skipOnConnect?: boolean;
8
+ }): Promise<void>;
9
+ protected attachDatabases(): Promise<void>;
8
10
  }
@@ -1,27 +1,25 @@
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(
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;
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.');
19
7
  }
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)}`);
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
+ }
25
24
  }
26
- }
27
25
  }
@@ -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,70 +1,54 @@
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';
1
+ import { ConnectionException, ExceptionConverter, InvalidFieldNameException, LockWaitTimeoutException, NonUniqueFieldNameException, CheckConstraintViolationException, NotNullConstraintViolationException, ReadOnlyException, SyntaxErrorException, TableExistsException, TableNotFoundException, UniqueConstraintViolationException, ForeignKeyConstraintViolationException, } from '@mikro-orm/core';
16
2
  export class SqliteExceptionConverter extends ExceptionConverter {
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);
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);
26
53
  }
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
- }
70
54
  }
@@ -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,68 +4,77 @@ 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: { 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
- | {
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 | {
67
76
  $in: (string | number)[];
68
- };
69
- getJsonArrayElementPropertySQL(alias: string, property: string, _type: string): string;
70
- quoteValue(value: any): string;
77
+ };
78
+ getJsonArrayElementPropertySQL(alias: string, property: string, _type: string): string;
79
+ quoteValue(value: any): string;
71
80
  }