@mikro-orm/core 7.2.0-dev.4 → 7.2.0-dev.6
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.
|
@@ -51,6 +51,13 @@ export declare abstract class Connection {
|
|
|
51
51
|
* This method doesn't support transactions, as opposed to `orm.schema.execute()`, which is used internally.
|
|
52
52
|
*/
|
|
53
53
|
executeDump(dump: string): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the underlying database client the connection drives — e.g. the `pg` pool, the
|
|
56
|
+
* `better-sqlite3` database, or the `PGlite` instance — for vendor APIs MikroORM does not wrap.
|
|
57
|
+
* Each driver narrows the return type to its own client. Its lifecycle belongs to the ORM, so
|
|
58
|
+
* leave closing it to `orm.close()` unless you supplied the client yourself via `driverOptions`.
|
|
59
|
+
*/
|
|
60
|
+
getNativeClient(): Promise<unknown>;
|
|
54
61
|
protected onConnect(): Promise<void>;
|
|
55
62
|
/** Executes a callback inside a transaction, committing on success and rolling back on failure. */
|
|
56
63
|
transactional<T>(cb: (trx: Transaction) => Promise<T>, options?: {
|
|
@@ -65,6 +65,15 @@ export class Connection {
|
|
|
65
65
|
async executeDump(dump) {
|
|
66
66
|
throw new Error(`Executing SQL dumps is not supported by current driver`);
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns the underlying database client the connection drives — e.g. the `pg` pool, the
|
|
70
|
+
* `better-sqlite3` database, or the `PGlite` instance — for vendor APIs MikroORM does not wrap.
|
|
71
|
+
* Each driver narrows the return type to its own client. Its lifecycle belongs to the ORM, so
|
|
72
|
+
* leave closing it to `orm.close()` unless you supplied the client yourself via `driverOptions`.
|
|
73
|
+
*/
|
|
74
|
+
async getNativeClient() {
|
|
75
|
+
throw new Error(`Accessing the native client is not supported by current driver`);
|
|
76
|
+
}
|
|
68
77
|
async onConnect() {
|
|
69
78
|
const schemaGenerator = this.config.getExtension('@mikro-orm/schema-generator');
|
|
70
79
|
if (this.type === 'write' && schemaGenerator) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.2.0-dev.
|
|
3
|
+
"version": "7.2.0-dev.6",
|
|
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",
|
package/utils/Utils.js
CHANGED
|
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
|
|
|
153
153
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
154
154
|
export class Utils {
|
|
155
155
|
static PK_SEPARATOR = '~~~';
|
|
156
|
-
static #ORM_VERSION = '7.2.0-dev.
|
|
156
|
+
static #ORM_VERSION = '7.2.0-dev.6';
|
|
157
157
|
/**
|
|
158
158
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
159
159
|
*/
|