@mikro-orm/knex 6.1.13-dev.24 → 6.1.13-dev.26
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/MonkeyPatchable.d.ts +1 -0
- package/MonkeyPatchable.js +3 -0
- package/README.md +15 -11
- package/dialects/index.d.ts +1 -0
- package/dialects/index.js +17 -0
- package/dialects/sqlite/BaseSqliteConnection.d.ts +10 -0
- package/dialects/sqlite/BaseSqliteConnection.js +56 -0
- package/dialects/sqlite/BaseSqlitePlatform.d.ts +49 -0
- package/dialects/sqlite/BaseSqlitePlatform.js +78 -0
- package/dialects/sqlite/BaseSqliteSchemaHelper.d.ts +27 -0
- package/dialects/sqlite/BaseSqliteSchemaHelper.js +172 -0
- package/dialects/sqlite/BetterSqliteKnexDialect.d.ts +5 -0
- package/dialects/sqlite/BetterSqliteKnexDialect.js +15 -0
- package/dialects/sqlite/LibSqlKnexDialect.d.ts +6 -0
- package/dialects/sqlite/LibSqlKnexDialect.js +18 -0
- package/dialects/sqlite/SqliteKnexDialect.d.ts +8 -0
- package/dialects/sqlite/SqliteKnexDialect.js +67 -0
- package/dialects/sqlite/SqliteTableCompiler.d.ts +5 -0
- package/dialects/sqlite/SqliteTableCompiler.js +45 -0
- package/dialects/sqlite/index.d.ts +7 -0
- package/dialects/sqlite/index.js +23 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.mjs +7 -0
- package/package.json +2 -2
package/MonkeyPatchable.d.ts
CHANGED
package/MonkeyPatchable.js
CHANGED
|
@@ -19,6 +19,8 @@ const pg_tablecompiler_1 = __importDefault(require("knex/lib/dialects/postgres/s
|
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
const sqlite3_1 = __importDefault(require("knex/lib/dialects/sqlite3"));
|
|
21
21
|
// @ts-ignore
|
|
22
|
+
const better_sqlite3_1 = __importDefault(require("knex/lib/dialects/better-sqlite3"));
|
|
23
|
+
// @ts-ignore
|
|
22
24
|
const sqlite_tablecompiler_1 = __importDefault(require("knex/lib/dialects/sqlite3/schema/sqlite-tablecompiler"));
|
|
23
25
|
// @ts-ignore
|
|
24
26
|
const tablecompiler_1 = __importDefault(require("knex/lib/schema/tablecompiler"));
|
|
@@ -35,5 +37,6 @@ exports.MonkeyPatchable = {
|
|
|
35
37
|
PostgresDialectTableCompiler: pg_tablecompiler_1.default,
|
|
36
38
|
Sqlite3Dialect: sqlite3_1.default,
|
|
37
39
|
Sqlite3DialectTableCompiler: sqlite_tablecompiler_1.default,
|
|
40
|
+
BetterSqlite3Dialect: better_sqlite3_1.default,
|
|
38
41
|
TableCompiler: tablecompiler_1.default,
|
|
39
42
|
};
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<a href="https://mikro-orm.io"><img src="https://raw.githubusercontent.com/mikro-orm/mikro-orm/master/docs/static/img/logo-readme.svg?sanitize=true" alt="MikroORM" /></a>
|
|
3
3
|
</h1>
|
|
4
4
|
|
|
5
|
-
TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.
|
|
5
|
+
TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite (including libSQL) databases.
|
|
6
6
|
|
|
7
7
|
> Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Hibernate](https://hibernate.org/).
|
|
8
8
|
|
|
@@ -175,21 +175,25 @@ First install the module via `yarn` or `npm` and do not forget to install the da
|
|
|
175
175
|
> Since v4, you should install the driver package, but not the db connector itself, e.g. install `@mikro-orm/sqlite`, but not `sqlite3` as that is already included in the driver package.
|
|
176
176
|
|
|
177
177
|
```sh
|
|
178
|
-
yarn add @mikro-orm/core @mikro-orm/mongodb
|
|
179
|
-
yarn add @mikro-orm/core @mikro-orm/mysql
|
|
180
|
-
yarn add @mikro-orm/core @mikro-orm/mariadb
|
|
181
|
-
yarn add @mikro-orm/core @mikro-orm/postgresql
|
|
182
|
-
yarn add @mikro-orm/core @mikro-orm/sqlite
|
|
178
|
+
yarn add @mikro-orm/core @mikro-orm/mongodb # for mongo
|
|
179
|
+
yarn add @mikro-orm/core @mikro-orm/mysql # for mysql/mariadb
|
|
180
|
+
yarn add @mikro-orm/core @mikro-orm/mariadb # for mysql/mariadb
|
|
181
|
+
yarn add @mikro-orm/core @mikro-orm/postgresql # for postgresql
|
|
182
|
+
yarn add @mikro-orm/core @mikro-orm/sqlite # for sqlite
|
|
183
|
+
yarn add @mikro-orm/core @mikro-orm/better-sqlite # for better-sqlite
|
|
184
|
+
yarn add @mikro-orm/core @mikro-orm/libsql # for libsql
|
|
183
185
|
```
|
|
184
186
|
|
|
185
187
|
or
|
|
186
188
|
|
|
187
189
|
```sh
|
|
188
|
-
npm i -s @mikro-orm/core @mikro-orm/mongodb
|
|
189
|
-
npm i -s @mikro-orm/core @mikro-orm/mysql
|
|
190
|
-
npm i -s @mikro-orm/core @mikro-orm/mariadb
|
|
191
|
-
npm i -s @mikro-orm/core @mikro-orm/postgresql
|
|
192
|
-
npm i -s @mikro-orm/core @mikro-orm/sqlite
|
|
190
|
+
npm i -s @mikro-orm/core @mikro-orm/mongodb # for mongo
|
|
191
|
+
npm i -s @mikro-orm/core @mikro-orm/mysql # for mysql/mariadb
|
|
192
|
+
npm i -s @mikro-orm/core @mikro-orm/mariadb # for mysql/mariadb
|
|
193
|
+
npm i -s @mikro-orm/core @mikro-orm/postgresql # for postgresql
|
|
194
|
+
npm i -s @mikro-orm/core @mikro-orm/sqlite # for sqlite
|
|
195
|
+
npm i -s @mikro-orm/core @mikro-orm/better-sqlite # for better-sqlite
|
|
196
|
+
npm i -s @mikro-orm/core @mikro-orm/libsql # for libsql
|
|
193
197
|
```
|
|
194
198
|
|
|
195
199
|
Next, if you want to use decorators for your entity definition, you will need to enable support for [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) as well as `esModuleInterop` in `tsconfig.json` via:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sqlite';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./sqlite"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Knex } from 'knex';
|
|
2
|
+
import { AbstractSqlConnection } from '../../AbstractSqlConnection';
|
|
3
|
+
export declare abstract class BaseSqliteConnection extends AbstractSqlConnection {
|
|
4
|
+
connect(): Promise<void>;
|
|
5
|
+
getDefaultClientUrl(): string;
|
|
6
|
+
getClientUrl(): string;
|
|
7
|
+
loadFile(path: string): Promise<void>;
|
|
8
|
+
protected getKnexOptions(type: string): Knex.Config;
|
|
9
|
+
protected transformRawResult<T>(res: any, method: 'all' | 'get' | 'run'): T;
|
|
10
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSqliteConnection = void 0;
|
|
4
|
+
const fs_extra_1 = require("fs-extra");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const AbstractSqlConnection_1 = require("../../AbstractSqlConnection");
|
|
7
|
+
const core_1 = require("@mikro-orm/core");
|
|
8
|
+
class BaseSqliteConnection extends AbstractSqlConnection_1.AbstractSqlConnection {
|
|
9
|
+
async connect() {
|
|
10
|
+
this.createKnex();
|
|
11
|
+
await (0, fs_extra_1.ensureDir)((0, path_1.dirname)(this.config.get('dbName')));
|
|
12
|
+
await this.client.raw('pragma foreign_keys = on');
|
|
13
|
+
}
|
|
14
|
+
getDefaultClientUrl() {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
getClientUrl() {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
async loadFile(path) {
|
|
21
|
+
const conn = await this.client.client.acquireConnection();
|
|
22
|
+
await conn.exec((await (0, fs_extra_1.readFile)(path)).toString());
|
|
23
|
+
await this.client.client.releaseConnection(conn);
|
|
24
|
+
}
|
|
25
|
+
getKnexOptions(type) {
|
|
26
|
+
return core_1.Utils.mergeConfig({
|
|
27
|
+
client: type,
|
|
28
|
+
connection: {
|
|
29
|
+
filename: this.config.get('dbName'),
|
|
30
|
+
},
|
|
31
|
+
pool: this.config.get('pool'),
|
|
32
|
+
useNullAsDefault: true,
|
|
33
|
+
}, this.config.get('driverOptions'));
|
|
34
|
+
}
|
|
35
|
+
transformRawResult(res, method) {
|
|
36
|
+
if (method === 'get') {
|
|
37
|
+
return res[0];
|
|
38
|
+
}
|
|
39
|
+
if (method === 'all') {
|
|
40
|
+
return res;
|
|
41
|
+
}
|
|
42
|
+
if (Array.isArray(res)) {
|
|
43
|
+
return {
|
|
44
|
+
insertId: res[res.length - 1]?.id ?? 0,
|
|
45
|
+
affectedRows: res.length,
|
|
46
|
+
row: res[0],
|
|
47
|
+
rows: res,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
insertId: res.lastInsertRowid,
|
|
52
|
+
affectedRows: res.changes,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.BaseSqliteConnection = BaseSqliteConnection;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AbstractSqlPlatform } from '../../AbstractSqlPlatform';
|
|
2
|
+
export declare abstract class BaseSqlitePlatform extends AbstractSqlPlatform {
|
|
3
|
+
usesDefaultKeyword(): boolean;
|
|
4
|
+
usesReturningStatement(): boolean;
|
|
5
|
+
getCurrentTimestampSQL(length: number): string;
|
|
6
|
+
getDateTimeTypeDeclarationSQL(column: {
|
|
7
|
+
length: number;
|
|
8
|
+
}): string;
|
|
9
|
+
getEnumTypeDeclarationSQL(column: {
|
|
10
|
+
items?: unknown[];
|
|
11
|
+
fieldNames: string[];
|
|
12
|
+
length?: number;
|
|
13
|
+
unsigned?: boolean;
|
|
14
|
+
autoincrement?: boolean;
|
|
15
|
+
}): string;
|
|
16
|
+
getTinyIntTypeDeclarationSQL(column: {
|
|
17
|
+
length?: number;
|
|
18
|
+
unsigned?: boolean;
|
|
19
|
+
autoincrement?: boolean;
|
|
20
|
+
}): string;
|
|
21
|
+
getSmallIntTypeDeclarationSQL(column: {
|
|
22
|
+
length?: number;
|
|
23
|
+
unsigned?: boolean;
|
|
24
|
+
autoincrement?: boolean;
|
|
25
|
+
}): string;
|
|
26
|
+
getIntegerTypeDeclarationSQL(column: {
|
|
27
|
+
length?: number;
|
|
28
|
+
unsigned?: boolean;
|
|
29
|
+
autoincrement?: boolean;
|
|
30
|
+
}): string;
|
|
31
|
+
getFloatDeclarationSQL(): string;
|
|
32
|
+
getBooleanTypeDeclarationSQL(): string;
|
|
33
|
+
getVarcharTypeDeclarationSQL(column: {
|
|
34
|
+
length?: number;
|
|
35
|
+
}): string;
|
|
36
|
+
convertsJsonAutomatically(): boolean;
|
|
37
|
+
allowsComparingTuples(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite.
|
|
40
|
+
* We use this method to convert Dates to timestamps when computing the changeset, so we have the right
|
|
41
|
+
* data type in the payload as well as in original entity data. Without that, we would end up with diffs
|
|
42
|
+
* including all Date properties, as we would be comparing Date object with timestamp.
|
|
43
|
+
*/
|
|
44
|
+
processDateProperty(value: unknown): string | number | Date;
|
|
45
|
+
getIndexName(tableName: string, columns: string[], type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence'): string;
|
|
46
|
+
getDefaultPrimaryName(tableName: string, columns: string[]): string;
|
|
47
|
+
supportsDownMigrations(): boolean;
|
|
48
|
+
getFullTextWhereClause(): string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSqlitePlatform = void 0;
|
|
4
|
+
const core_1 = require("@mikro-orm/core");
|
|
5
|
+
const AbstractSqlPlatform_1 = require("../../AbstractSqlPlatform");
|
|
6
|
+
class BaseSqlitePlatform extends AbstractSqlPlatform_1.AbstractSqlPlatform {
|
|
7
|
+
usesDefaultKeyword() {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
usesReturningStatement() {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
getCurrentTimestampSQL(length) {
|
|
14
|
+
return super.getCurrentTimestampSQL(0);
|
|
15
|
+
}
|
|
16
|
+
getDateTimeTypeDeclarationSQL(column) {
|
|
17
|
+
return 'datetime';
|
|
18
|
+
}
|
|
19
|
+
getEnumTypeDeclarationSQL(column) {
|
|
20
|
+
if (column.items?.every(item => core_1.Utils.isString(item))) {
|
|
21
|
+
return 'text';
|
|
22
|
+
}
|
|
23
|
+
/* istanbul ignore next */
|
|
24
|
+
return this.getTinyIntTypeDeclarationSQL(column);
|
|
25
|
+
}
|
|
26
|
+
getTinyIntTypeDeclarationSQL(column) {
|
|
27
|
+
return this.getIntegerTypeDeclarationSQL(column);
|
|
28
|
+
}
|
|
29
|
+
getSmallIntTypeDeclarationSQL(column) {
|
|
30
|
+
return this.getIntegerTypeDeclarationSQL(column);
|
|
31
|
+
}
|
|
32
|
+
getIntegerTypeDeclarationSQL(column) {
|
|
33
|
+
return 'integer';
|
|
34
|
+
}
|
|
35
|
+
getFloatDeclarationSQL() {
|
|
36
|
+
return 'real';
|
|
37
|
+
}
|
|
38
|
+
getBooleanTypeDeclarationSQL() {
|
|
39
|
+
return 'integer';
|
|
40
|
+
}
|
|
41
|
+
getVarcharTypeDeclarationSQL(column) {
|
|
42
|
+
return 'text';
|
|
43
|
+
}
|
|
44
|
+
convertsJsonAutomatically() {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
allowsComparingTuples() {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite.
|
|
52
|
+
* We use this method to convert Dates to timestamps when computing the changeset, so we have the right
|
|
53
|
+
* data type in the payload as well as in original entity data. Without that, we would end up with diffs
|
|
54
|
+
* including all Date properties, as we would be comparing Date object with timestamp.
|
|
55
|
+
*/
|
|
56
|
+
processDateProperty(value) {
|
|
57
|
+
if (value instanceof Date) {
|
|
58
|
+
return +value;
|
|
59
|
+
}
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
getIndexName(tableName, columns, type) {
|
|
63
|
+
if (type === 'primary') {
|
|
64
|
+
return this.getDefaultPrimaryName(tableName, columns);
|
|
65
|
+
}
|
|
66
|
+
return super.getIndexName(tableName, columns, type);
|
|
67
|
+
}
|
|
68
|
+
getDefaultPrimaryName(tableName, columns) {
|
|
69
|
+
return 'primary';
|
|
70
|
+
}
|
|
71
|
+
supportsDownMigrations() {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
getFullTextWhereClause() {
|
|
75
|
+
return `:column: match :query`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.BaseSqlitePlatform = BaseSqlitePlatform;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Connection, Dictionary } from '@mikro-orm/core';
|
|
2
|
+
import type { AbstractSqlConnection } from '../../AbstractSqlConnection';
|
|
3
|
+
import { SchemaHelper } from '../../schema/SchemaHelper';
|
|
4
|
+
import type { CheckDef, Column, IndexDef } from '../../typings';
|
|
5
|
+
export declare abstract class BaseSqliteSchemaHelper extends SchemaHelper {
|
|
6
|
+
disableForeignKeysSQL(): string;
|
|
7
|
+
enableForeignKeysSQL(): string;
|
|
8
|
+
supportsSchemaConstraints(): boolean;
|
|
9
|
+
getListTablesSQL(): string;
|
|
10
|
+
getDropDatabaseSQL(name: string): string;
|
|
11
|
+
getDropColumnsSQL(tableName: string, columns: Column[], schemaName?: string): string;
|
|
12
|
+
private parseTableDefinition;
|
|
13
|
+
getColumns(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<any[]>;
|
|
14
|
+
getEnumDefinitions(connection: AbstractSqlConnection, checks: CheckDef[], tableName: string, schemaName: string): Promise<Dictionary<string[]>>;
|
|
15
|
+
getPrimaryKeys(connection: AbstractSqlConnection, indexes: IndexDef[], tableName: string, schemaName?: string): Promise<string[]>;
|
|
16
|
+
getIndexes(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<IndexDef[]>;
|
|
17
|
+
getChecks(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<CheckDef[]>;
|
|
18
|
+
getForeignKeysSQL(tableName: string): string;
|
|
19
|
+
mapForeignKeys(fks: any[], tableName: string): Dictionary;
|
|
20
|
+
getManagementDbName(): string;
|
|
21
|
+
getCreateDatabaseSQL(name: string): string;
|
|
22
|
+
databaseExists(connection: Connection, name: string): Promise<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Implicit indexes will be ignored when diffing
|
|
25
|
+
*/
|
|
26
|
+
isImplicitIndex(name: string): boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSqliteSchemaHelper = void 0;
|
|
4
|
+
const SchemaHelper_1 = require("../../schema/SchemaHelper");
|
|
5
|
+
class BaseSqliteSchemaHelper extends SchemaHelper_1.SchemaHelper {
|
|
6
|
+
disableForeignKeysSQL() {
|
|
7
|
+
return 'pragma foreign_keys = off;';
|
|
8
|
+
}
|
|
9
|
+
enableForeignKeysSQL() {
|
|
10
|
+
return 'pragma foreign_keys = on;';
|
|
11
|
+
}
|
|
12
|
+
supportsSchemaConstraints() {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
getListTablesSQL() {
|
|
16
|
+
return `select name as table_name from sqlite_master where type = 'table' and name != 'sqlite_sequence' and name != 'geometry_columns' and name != 'spatial_ref_sys' `
|
|
17
|
+
+ `union all select name as table_name from sqlite_temp_master where type = 'table' order by name`;
|
|
18
|
+
}
|
|
19
|
+
getDropDatabaseSQL(name) {
|
|
20
|
+
if (name === ':memory:') {
|
|
21
|
+
return '';
|
|
22
|
+
}
|
|
23
|
+
/* istanbul ignore next */
|
|
24
|
+
return `drop database if exists ${this.platform.quoteIdentifier(name)}`;
|
|
25
|
+
}
|
|
26
|
+
getDropColumnsSQL(tableName, columns, schemaName) {
|
|
27
|
+
/* istanbul ignore next */
|
|
28
|
+
const name = this.platform.quoteIdentifier((schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName);
|
|
29
|
+
return columns.map(column => {
|
|
30
|
+
return `alter table ${name} drop column ${this.platform.quoteIdentifier(column.name)}`;
|
|
31
|
+
}).join(';\n');
|
|
32
|
+
}
|
|
33
|
+
parseTableDefinition(sql, cols) {
|
|
34
|
+
const columns = {};
|
|
35
|
+
// extract all columns definitions
|
|
36
|
+
let columnsDef = sql.replaceAll('\n', '').match(new RegExp(`create table [\`"']?.*?[\`"']? \\((.*)\\)`, 'i'))?.[1];
|
|
37
|
+
/* istanbul ignore else */
|
|
38
|
+
if (columnsDef) {
|
|
39
|
+
for (let i = cols.length - 1; i >= 0; i--) {
|
|
40
|
+
const col = cols[i];
|
|
41
|
+
const re = ` *, *[\`"']?${col.name}[\`"']? (.*)`;
|
|
42
|
+
const columnDef = columnsDef.match(new RegExp(re, 'i'));
|
|
43
|
+
/* istanbul ignore else */
|
|
44
|
+
if (columnDef) {
|
|
45
|
+
columns[col.name] = { name: col.name, definition: columnDef[1] };
|
|
46
|
+
columnsDef = columnsDef.substring(0, columnDef.index);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return columns;
|
|
51
|
+
}
|
|
52
|
+
async getColumns(connection, tableName, schemaName) {
|
|
53
|
+
const columns = await connection.execute(`pragma table_xinfo('${tableName}')`);
|
|
54
|
+
const sql = `select sql from sqlite_master where type = ? and name = ?`;
|
|
55
|
+
const tableDefinition = await connection.execute(sql, ['table', tableName], 'get');
|
|
56
|
+
const composite = columns.reduce((count, col) => count + (col.pk ? 1 : 0), 0) > 1;
|
|
57
|
+
// there can be only one, so naive check like this should be enough
|
|
58
|
+
const hasAutoincrement = tableDefinition.sql.toLowerCase().includes('autoincrement');
|
|
59
|
+
const columnDefinitions = this.parseTableDefinition(tableDefinition.sql, columns);
|
|
60
|
+
return columns.map(col => {
|
|
61
|
+
const mappedType = connection.getPlatform().getMappedType(col.type);
|
|
62
|
+
let generated;
|
|
63
|
+
if (col.hidden > 1) {
|
|
64
|
+
/* istanbul ignore next */
|
|
65
|
+
const storage = col.hidden === 2 ? 'virtual' : 'stored';
|
|
66
|
+
const re = `(generated always)? as \\((.*)\\)( ${storage})?$`;
|
|
67
|
+
const match = columnDefinitions[col.name].definition.match(re);
|
|
68
|
+
if (match) {
|
|
69
|
+
generated = `${match[2]} ${storage}`;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
name: col.name,
|
|
74
|
+
type: col.type,
|
|
75
|
+
default: col.dflt_value,
|
|
76
|
+
nullable: !col.notnull,
|
|
77
|
+
primary: !!col.pk,
|
|
78
|
+
mappedType,
|
|
79
|
+
unsigned: false,
|
|
80
|
+
autoincrement: !composite && col.pk && this.platform.isNumericColumn(mappedType) && hasAutoincrement,
|
|
81
|
+
generated,
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async getEnumDefinitions(connection, checks, tableName, schemaName) {
|
|
86
|
+
const sql = `select sql from sqlite_master where type = ? and name = ?`;
|
|
87
|
+
const tableDefinition = await connection.execute(sql, ['table', tableName], 'get');
|
|
88
|
+
const checkConstraints = [...tableDefinition.sql.match(/[`["'][^`\]"']+[`\]"'] text check \(.*?\)/gi) ?? []];
|
|
89
|
+
return checkConstraints.reduce((o, item) => {
|
|
90
|
+
// check constraints are defined as (note that last closing paren is missing):
|
|
91
|
+
// `type` text check (`type` in ('local', 'global')
|
|
92
|
+
const match = item.match(/[`["']([^`\]"']+)[`\]"'] text check \(.* \((.*)\)/i);
|
|
93
|
+
/* istanbul ignore else */
|
|
94
|
+
if (match) {
|
|
95
|
+
o[match[1]] = match[2].split(',').map((item) => item.trim().match(/^\(?'(.*)'/)[1]);
|
|
96
|
+
}
|
|
97
|
+
return o;
|
|
98
|
+
}, {});
|
|
99
|
+
}
|
|
100
|
+
async getPrimaryKeys(connection, indexes, tableName, schemaName) {
|
|
101
|
+
const sql = `pragma table_info(\`${tableName}\`)`;
|
|
102
|
+
const cols = await connection.execute(sql);
|
|
103
|
+
return cols.filter(col => !!col.pk).map(col => col.name);
|
|
104
|
+
}
|
|
105
|
+
async getIndexes(connection, tableName, schemaName) {
|
|
106
|
+
const sql = `pragma table_info(\`${tableName}\`)`;
|
|
107
|
+
const cols = await connection.execute(sql);
|
|
108
|
+
const indexes = await connection.execute(`pragma index_list(\`${tableName}\`)`);
|
|
109
|
+
const ret = [];
|
|
110
|
+
for (const col of cols.filter(c => c.pk)) {
|
|
111
|
+
ret.push({
|
|
112
|
+
columnNames: [col.name],
|
|
113
|
+
keyName: 'primary',
|
|
114
|
+
constraint: true,
|
|
115
|
+
unique: true,
|
|
116
|
+
primary: true,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
for (const index of indexes.filter(index => !this.isImplicitIndex(index.name))) {
|
|
120
|
+
const res = await connection.execute(`pragma index_info(\`${index.name}\`)`);
|
|
121
|
+
ret.push(...res.map(row => ({
|
|
122
|
+
columnNames: [row.name],
|
|
123
|
+
keyName: index.name,
|
|
124
|
+
unique: !!index.unique,
|
|
125
|
+
constraint: !!index.unique,
|
|
126
|
+
primary: false,
|
|
127
|
+
})));
|
|
128
|
+
}
|
|
129
|
+
return this.mapIndexes(ret);
|
|
130
|
+
}
|
|
131
|
+
async getChecks(connection, tableName, schemaName) {
|
|
132
|
+
// Not supported at the moment.
|
|
133
|
+
return [];
|
|
134
|
+
}
|
|
135
|
+
getForeignKeysSQL(tableName) {
|
|
136
|
+
return `pragma foreign_key_list(\`${tableName}\`)`;
|
|
137
|
+
}
|
|
138
|
+
mapForeignKeys(fks, tableName) {
|
|
139
|
+
return fks.reduce((ret, fk) => {
|
|
140
|
+
ret[fk.from] = {
|
|
141
|
+
constraintName: this.platform.getIndexName(tableName, [fk.from], 'foreign'),
|
|
142
|
+
columnName: fk.from,
|
|
143
|
+
columnNames: [fk.from],
|
|
144
|
+
localTableName: tableName,
|
|
145
|
+
referencedTableName: fk.table,
|
|
146
|
+
referencedColumnName: fk.to,
|
|
147
|
+
referencedColumnNames: [fk.to],
|
|
148
|
+
updateRule: fk.on_update.toLowerCase(),
|
|
149
|
+
deleteRule: fk.on_delete.toLowerCase(),
|
|
150
|
+
};
|
|
151
|
+
return ret;
|
|
152
|
+
}, {});
|
|
153
|
+
}
|
|
154
|
+
getManagementDbName() {
|
|
155
|
+
return '';
|
|
156
|
+
}
|
|
157
|
+
getCreateDatabaseSQL(name) {
|
|
158
|
+
return '';
|
|
159
|
+
}
|
|
160
|
+
async databaseExists(connection, name) {
|
|
161
|
+
const tables = await connection.execute(this.getListTablesSQL());
|
|
162
|
+
return tables.length > 0;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Implicit indexes will be ignored when diffing
|
|
166
|
+
*/
|
|
167
|
+
isImplicitIndex(name) {
|
|
168
|
+
// Ignore indexes with reserved names, e.g. autoindexes
|
|
169
|
+
return name.startsWith('sqlite_');
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.BaseSqliteSchemaHelper = BaseSqliteSchemaHelper;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BetterSqliteKnexDialect = void 0;
|
|
4
|
+
const SqliteTableCompiler_1 = require("./SqliteTableCompiler");
|
|
5
|
+
const MonkeyPatchable_1 = require("../../MonkeyPatchable");
|
|
6
|
+
class BetterSqliteKnexDialect extends MonkeyPatchable_1.MonkeyPatchable.BetterSqlite3Dialect {
|
|
7
|
+
_driver() {
|
|
8
|
+
return require('better-sqlite3');
|
|
9
|
+
}
|
|
10
|
+
tableCompiler() {
|
|
11
|
+
// eslint-disable-next-line prefer-rest-params
|
|
12
|
+
return new SqliteTableCompiler_1.SqliteTableCompiler(this, ...arguments);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.BetterSqliteKnexDialect = BetterSqliteKnexDialect;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LibSqlKnexDialect = void 0;
|
|
4
|
+
const SqliteTableCompiler_1 = require("./SqliteTableCompiler");
|
|
5
|
+
const MonkeyPatchable_1 = require("../../MonkeyPatchable");
|
|
6
|
+
class LibSqlKnexDialect extends MonkeyPatchable_1.MonkeyPatchable.BetterSqlite3Dialect {
|
|
7
|
+
get driverName() {
|
|
8
|
+
return 'libsql';
|
|
9
|
+
}
|
|
10
|
+
_driver() {
|
|
11
|
+
return require('libsql');
|
|
12
|
+
}
|
|
13
|
+
tableCompiler() {
|
|
14
|
+
// eslint-disable-next-line prefer-rest-params
|
|
15
|
+
return new SqliteTableCompiler_1.SqliteTableCompiler(this, ...arguments);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.LibSqlKnexDialect = LibSqlKnexDialect;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MonkeyPatchable } from '../../MonkeyPatchable';
|
|
2
|
+
export declare class SqliteKnexDialect extends MonkeyPatchable.Sqlite3Dialect {
|
|
3
|
+
tableCompiler(): any;
|
|
4
|
+
processResponse(obj: any, runner: any): any;
|
|
5
|
+
_query(connection: any, obj: any): Promise<unknown>;
|
|
6
|
+
private getCallMethod;
|
|
7
|
+
private isRunQuery;
|
|
8
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SqliteKnexDialect = void 0;
|
|
4
|
+
const SqliteTableCompiler_1 = require("./SqliteTableCompiler");
|
|
5
|
+
const MonkeyPatchable_1 = require("../../MonkeyPatchable");
|
|
6
|
+
class SqliteKnexDialect extends MonkeyPatchable_1.MonkeyPatchable.Sqlite3Dialect {
|
|
7
|
+
tableCompiler() {
|
|
8
|
+
// eslint-disable-next-line prefer-rest-params
|
|
9
|
+
return new SqliteTableCompiler_1.SqliteTableCompiler(this, ...arguments);
|
|
10
|
+
}
|
|
11
|
+
processResponse(obj, runner) {
|
|
12
|
+
if (obj.method === 'raw' && this.isRunQuery(obj.sql)) {
|
|
13
|
+
return obj.response ?? obj.context;
|
|
14
|
+
}
|
|
15
|
+
return super.processResponse(obj, runner);
|
|
16
|
+
}
|
|
17
|
+
_query(connection, obj) {
|
|
18
|
+
const callMethod = this.getCallMethod(obj);
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
/* istanbul ignore if */
|
|
21
|
+
if (!connection?.[callMethod]) {
|
|
22
|
+
return reject(new Error(`Error calling ${callMethod} on connection.`));
|
|
23
|
+
}
|
|
24
|
+
connection[callMethod](obj.sql, obj.bindings, function (err, response) {
|
|
25
|
+
if (err) {
|
|
26
|
+
return reject(err);
|
|
27
|
+
}
|
|
28
|
+
obj.response = response;
|
|
29
|
+
obj.context = this;
|
|
30
|
+
return resolve(obj);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
getCallMethod(obj) {
|
|
35
|
+
if (obj.method === 'raw') {
|
|
36
|
+
const query = obj.sql.trim().toLowerCase();
|
|
37
|
+
if ((query.startsWith('insert into') || query.startsWith('update ')) && query.includes(' returning ')) {
|
|
38
|
+
return 'all';
|
|
39
|
+
}
|
|
40
|
+
if (this.isRunQuery(query)) {
|
|
41
|
+
return 'run';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/* istanbul ignore next */
|
|
45
|
+
switch (obj.method) {
|
|
46
|
+
case 'insert':
|
|
47
|
+
case 'update':
|
|
48
|
+
return obj.returning ? 'all' : 'run';
|
|
49
|
+
case 'counter':
|
|
50
|
+
case 'del':
|
|
51
|
+
return 'run';
|
|
52
|
+
default:
|
|
53
|
+
return 'all';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
isRunQuery(query) {
|
|
57
|
+
query = query.trim().toLowerCase();
|
|
58
|
+
if ((query.startsWith('insert into') || query.startsWith('update ')) && query.includes(' returning ')) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return query.startsWith('insert into') ||
|
|
62
|
+
query.startsWith('update') ||
|
|
63
|
+
query.startsWith('delete') ||
|
|
64
|
+
query.startsWith('truncate');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.SqliteKnexDialect = SqliteKnexDialect;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SqliteTableCompiler = void 0;
|
|
4
|
+
const MonkeyPatchable_1 = require("../../MonkeyPatchable");
|
|
5
|
+
class SqliteTableCompiler extends MonkeyPatchable_1.MonkeyPatchable.Sqlite3DialectTableCompiler {
|
|
6
|
+
foreign(foreignInfo) {
|
|
7
|
+
foreignInfo.column = Array.isArray(foreignInfo.column)
|
|
8
|
+
? foreignInfo.column
|
|
9
|
+
: [foreignInfo.column];
|
|
10
|
+
foreignInfo.column = foreignInfo.column.map((column) => this.client.customWrapIdentifier(column, (a) => a));
|
|
11
|
+
foreignInfo.inTable = this.client.customWrapIdentifier(foreignInfo.inTable, (a) => a);
|
|
12
|
+
foreignInfo.references = Array.isArray(foreignInfo.references)
|
|
13
|
+
? foreignInfo.references
|
|
14
|
+
: [foreignInfo.references];
|
|
15
|
+
foreignInfo.references = foreignInfo.references.map((column) => this.client.customWrapIdentifier(column, (a) => a));
|
|
16
|
+
// quoted versions
|
|
17
|
+
const column = this.formatter.columnize(foreignInfo.column);
|
|
18
|
+
const inTable = this.formatter.columnize(foreignInfo.inTable);
|
|
19
|
+
const references = this.formatter.columnize(foreignInfo.references);
|
|
20
|
+
const keyName = this.formatter.columnize(foreignInfo.keyName);
|
|
21
|
+
const addColumnQuery = this.sequence.find((query) => query.sql.includes(`add column ${column[0]}`));
|
|
22
|
+
// no need for temp tables if we just add a column
|
|
23
|
+
if (addColumnQuery) {
|
|
24
|
+
/* istanbul ignore next */
|
|
25
|
+
const onUpdate = foreignInfo.onUpdate ? ` on update ${foreignInfo.onUpdate}` : '';
|
|
26
|
+
/* istanbul ignore next */
|
|
27
|
+
const onDelete = foreignInfo.onDelete ? ` on delete ${foreignInfo.onDelete}` : '';
|
|
28
|
+
addColumnQuery.sql += ` constraint ${keyName} references ${inTable} (${references})${onUpdate}${onDelete}`;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
32
|
+
const compiler = this;
|
|
33
|
+
if (this.method !== 'create' && this.method !== 'createIfNot') {
|
|
34
|
+
this.pushQuery({
|
|
35
|
+
sql: `PRAGMA table_info(${this.tableName()})`,
|
|
36
|
+
statementsProducer(pragma, connection) {
|
|
37
|
+
return compiler.client
|
|
38
|
+
.ddl(compiler, pragma, connection)
|
|
39
|
+
.foreign(foreignInfo);
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.SqliteTableCompiler = SqliteTableCompiler;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './BaseSqliteConnection';
|
|
2
|
+
export * from './BaseSqlitePlatform';
|
|
3
|
+
export * from './BaseSqliteSchemaHelper';
|
|
4
|
+
export * from './SqliteTableCompiler';
|
|
5
|
+
export * from './BetterSqliteKnexDialect';
|
|
6
|
+
export * from './LibSqlKnexDialect';
|
|
7
|
+
export * from './SqliteKnexDialect';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BaseSqliteConnection"), exports);
|
|
18
|
+
__exportStar(require("./BaseSqlitePlatform"), exports);
|
|
19
|
+
__exportStar(require("./BaseSqliteSchemaHelper"), exports);
|
|
20
|
+
__exportStar(require("./SqliteTableCompiler"), exports);
|
|
21
|
+
__exportStar(require("./BetterSqliteKnexDialect"), exports);
|
|
22
|
+
__exportStar(require("./LibSqlKnexDialect"), exports);
|
|
23
|
+
__exportStar(require("./SqliteKnexDialect"), exports);
|
package/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './SqlEntityManager';
|
|
|
10
10
|
export * from './SqlEntityRepository';
|
|
11
11
|
export * from './query';
|
|
12
12
|
export * from './schema';
|
|
13
|
+
export * from './dialects';
|
|
13
14
|
export * from './typings';
|
|
14
15
|
export { SqlEntityManager as EntityManager } from './SqlEntityManager';
|
|
15
16
|
export { SqlEntityRepository as EntityRepository } from './SqlEntityRepository';
|
package/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./SqlEntityManager"), exports);
|
|
|
28
28
|
__exportStar(require("./SqlEntityRepository"), exports);
|
|
29
29
|
__exportStar(require("./query"), exports);
|
|
30
30
|
__exportStar(require("./schema"), exports);
|
|
31
|
+
__exportStar(require("./dialects"), exports);
|
|
31
32
|
__exportStar(require("./typings"), exports);
|
|
32
33
|
var SqlEntityManager_1 = require("./SqlEntityManager");
|
|
33
34
|
Object.defineProperty(exports, "EntityManager", { enumerable: true, get: function () { return SqlEntityManager_1.SqlEntityManager; } });
|
package/index.mjs
CHANGED
|
@@ -17,10 +17,14 @@ export const ArrayCollection = mod.ArrayCollection;
|
|
|
17
17
|
export const ArrayCriteriaNode = mod.ArrayCriteriaNode;
|
|
18
18
|
export const ArrayType = mod.ArrayType;
|
|
19
19
|
export const BaseEntity = mod.BaseEntity;
|
|
20
|
+
export const BaseSqliteConnection = mod.BaseSqliteConnection;
|
|
21
|
+
export const BaseSqlitePlatform = mod.BaseSqlitePlatform;
|
|
22
|
+
export const BaseSqliteSchemaHelper = mod.BaseSqliteSchemaHelper;
|
|
20
23
|
export const BeforeCreate = mod.BeforeCreate;
|
|
21
24
|
export const BeforeDelete = mod.BeforeDelete;
|
|
22
25
|
export const BeforeUpdate = mod.BeforeUpdate;
|
|
23
26
|
export const BeforeUpsert = mod.BeforeUpsert;
|
|
27
|
+
export const BetterSqliteKnexDialect = mod.BetterSqliteKnexDialect;
|
|
24
28
|
export const BigIntType = mod.BigIntType;
|
|
25
29
|
export const BlobType = mod.BlobType;
|
|
26
30
|
export const BooleanType = mod.BooleanType;
|
|
@@ -108,6 +112,7 @@ export const JoinType = mod.JoinType;
|
|
|
108
112
|
export const JsonProperty = mod.JsonProperty;
|
|
109
113
|
export const JsonType = mod.JsonType;
|
|
110
114
|
export const Knex = mod.Knex;
|
|
115
|
+
export const LibSqlKnexDialect = mod.LibSqlKnexDialect;
|
|
111
116
|
export const LoadStrategy = mod.LoadStrategy;
|
|
112
117
|
export const LockMode = mod.LockMode;
|
|
113
118
|
export const LockWaitTimeoutException = mod.LockWaitTimeoutException;
|
|
@@ -173,6 +178,8 @@ export const SmallIntType = mod.SmallIntType;
|
|
|
173
178
|
export const SqlEntityManager = mod.SqlEntityManager;
|
|
174
179
|
export const SqlEntityRepository = mod.SqlEntityRepository;
|
|
175
180
|
export const SqlSchemaGenerator = mod.SqlSchemaGenerator;
|
|
181
|
+
export const SqliteKnexDialect = mod.SqliteKnexDialect;
|
|
182
|
+
export const SqliteTableCompiler = mod.SqliteTableCompiler;
|
|
176
183
|
export const StringType = mod.StringType;
|
|
177
184
|
export const SyntaxErrorException = mod.SyntaxErrorException;
|
|
178
185
|
export const TableExistsException = mod.TableExistsException;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.1.13-dev.
|
|
3
|
+
"version": "6.1.13-dev.26",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.1.12"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.1.13-dev.
|
|
69
|
+
"@mikro-orm/core": "6.1.13-dev.26"
|
|
70
70
|
}
|
|
71
71
|
}
|