@mikro-orm/core 7.0.0-dev.94 → 7.0.0-dev.96
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.
|
@@ -42,6 +42,10 @@ export declare abstract class Connection {
|
|
|
42
42
|
* Ensure the connection exists, this is used to support lazy connect when using `new MikroORM()` instead of the async `init` method.
|
|
43
43
|
*/
|
|
44
44
|
ensureConnection(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Load schema dump from file and execute it. Not supported by MongoDB driver.
|
|
47
|
+
*/
|
|
48
|
+
loadFile(path: string): Promise<void>;
|
|
45
49
|
protected onConnect(): Promise<void>;
|
|
46
50
|
transactional<T>(cb: (trx: Transaction) => Promise<T>, options?: {
|
|
47
51
|
isolationLevel?: IsolationLevel | `${IsolationLevel}`;
|
|
@@ -39,6 +39,12 @@ export class Connection {
|
|
|
39
39
|
await this.connect();
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Load schema dump from file and execute it. Not supported by MongoDB driver.
|
|
44
|
+
*/
|
|
45
|
+
async loadFile(path) {
|
|
46
|
+
throw new Error(`Loading SQL files is not supported by current driver`);
|
|
47
|
+
}
|
|
42
48
|
async onConnect() {
|
|
43
49
|
const schemaGenerator = this.config.getExtension('@mikro-orm/schema-generator');
|
|
44
50
|
if (this.type === 'write' && schemaGenerator) {
|
|
@@ -58,7 +58,7 @@ export declare class WrappedEntity<Entity extends object> {
|
|
|
58
58
|
setPrimaryKey(id: Primary<Entity> | null): void;
|
|
59
59
|
getSerializedPrimaryKey(): string;
|
|
60
60
|
get __meta(): EntityMetadata<Entity>;
|
|
61
|
-
get __platform(): import("@mikro-orm/
|
|
62
|
-
get __config(): import("@mikro-orm/
|
|
61
|
+
get __platform(): import("@mikro-orm/sql").Platform;
|
|
62
|
+
get __config(): import("@mikro-orm/sql").Configuration<import("../drivers/IDatabaseDriver.js").IDatabaseDriver<import("@mikro-orm/sql").Connection>, EntityManager<import("../drivers/IDatabaseDriver.js").IDatabaseDriver<import("@mikro-orm/sql").Connection>>>;
|
|
63
63
|
get __primaryKeys(): Primary<Entity>[];
|
|
64
64
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.96",
|
|
5
5
|
"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.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
package/utils/Configuration.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ declare const DEFAULTS: {
|
|
|
35
35
|
readonly inferDefaultValues: true;
|
|
36
36
|
};
|
|
37
37
|
readonly validateRequired: true;
|
|
38
|
-
readonly context: (name: string) => EntityManager<IDatabaseDriver<import("@mikro-orm/
|
|
38
|
+
readonly context: (name: string) => EntityManager<IDatabaseDriver<import("@mikro-orm/sql").Connection>> | undefined;
|
|
39
39
|
readonly contextName: "default";
|
|
40
40
|
readonly allowGlobalContext: false;
|
|
41
41
|
readonly logger: (message?: any, ...optionalParams: any[]) => void;
|
package/utils/Utils.js
CHANGED
|
@@ -125,7 +125,7 @@ export function parseJsonSafe(value) {
|
|
|
125
125
|
}
|
|
126
126
|
export class Utils {
|
|
127
127
|
static PK_SEPARATOR = '~~~';
|
|
128
|
-
static #ORM_VERSION = '7.0.0-dev.
|
|
128
|
+
static #ORM_VERSION = '7.0.0-dev.96';
|
|
129
129
|
/* v8 ignore next */
|
|
130
130
|
static dynamicImportProvider = (id) => import(id);
|
|
131
131
|
/**
|