@mikro-orm/sqlite 7.2.0-dev.5 → 7.2.0-dev.7
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/SqliteConnection.d.ts +3 -0
- package/SqliteConnection.js +5 -0
- package/package.json +4 -4
package/SqliteConnection.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseSqliteConnection, type Dictionary } from '@mikro-orm/sql';
|
|
2
2
|
import { type Dialect } from 'kysely';
|
|
3
|
+
import Database from 'better-sqlite3';
|
|
3
4
|
import { type Routine, type Transaction } from '@mikro-orm/core';
|
|
4
5
|
/** SQLite database connection using the `better-sqlite3` driver. */
|
|
5
6
|
export declare class SqliteConnection extends BaseSqliteConnection {
|
|
@@ -8,6 +9,8 @@ export declare class SqliteConnection extends BaseSqliteConnection {
|
|
|
8
9
|
createKyselyDialect(options: Dictionary): Dialect;
|
|
9
10
|
/** @inheritDoc */
|
|
10
11
|
executeDump(dump: string): Promise<void>;
|
|
12
|
+
/** Returns the `better-sqlite3` database backing this connection. */
|
|
13
|
+
getNativeClient(): Promise<Database.Database>;
|
|
11
14
|
/** SQLite has no procedures; functions bridge via `bodyJs` registered as a UDF. */
|
|
12
15
|
callRoutine<T>(routine: Routine, args?: Record<string, unknown>, ctx?: Transaction): Promise<T>;
|
|
13
16
|
}
|
package/SqliteConnection.js
CHANGED
|
@@ -21,6 +21,11 @@ export class SqliteConnection extends BaseSqliteConnection {
|
|
|
21
21
|
await this.ensureConnection();
|
|
22
22
|
this.database.exec(dump);
|
|
23
23
|
}
|
|
24
|
+
/** Returns the `better-sqlite3` database backing this connection. */
|
|
25
|
+
async getNativeClient() {
|
|
26
|
+
await this.ensureConnection();
|
|
27
|
+
return this.requireNativeClient(this.database);
|
|
28
|
+
}
|
|
24
29
|
/** SQLite has no procedures; functions bridge via `bodyJs` registered as a UDF. */
|
|
25
30
|
async callRoutine(routine, args = {}, ctx) {
|
|
26
31
|
if (routine.type === 'procedure') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/sqlite",
|
|
3
|
-
"version": "7.2.0-dev.
|
|
3
|
+
"version": "7.2.0-dev.7",
|
|
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
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mikro-orm/sql": "7.2.0-dev.
|
|
50
|
+
"@mikro-orm/sql": "7.2.0-dev.7",
|
|
51
51
|
"better-sqlite3": "12.11.1",
|
|
52
|
-
"kysely": "0.29.
|
|
52
|
+
"kysely": "0.29.5"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@mikro-orm/core": "^7.1.11"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@mikro-orm/core": "7.2.0-dev.
|
|
58
|
+
"@mikro-orm/core": "7.2.0-dev.7"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">= 22.17.0"
|