@mikro-orm/core 7.0.0-dev.104 → 7.0.0-dev.106

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.
@@ -43,9 +43,10 @@ export declare abstract class Connection {
43
43
  */
44
44
  ensureConnection(): Promise<void>;
45
45
  /**
46
- * Load schema dump from file and execute it. Not supported by MongoDB driver.
46
+ * Execute raw SQL queries, handy from running schema dump loaded from a file.
47
+ * This method doesn't support transactions, as opposed to `orm.schema.execute()`, which is used internally.
47
48
  */
48
- loadFile(path: string): Promise<void>;
49
+ executeDump(dump: string): Promise<void>;
49
50
  protected onConnect(): Promise<void>;
50
51
  transactional<T>(cb: (trx: Transaction) => Promise<T>, options?: {
51
52
  isolationLevel?: IsolationLevel | `${IsolationLevel}`;
@@ -40,10 +40,11 @@ export class Connection {
40
40
  }
41
41
  }
42
42
  /**
43
- * Load schema dump from file and execute it. Not supported by MongoDB driver.
43
+ * Execute raw SQL queries, handy from running schema dump loaded from a file.
44
+ * This method doesn't support transactions, as opposed to `orm.schema.execute()`, which is used internally.
44
45
  */
45
- async loadFile(path) {
46
- throw new Error(`Loading SQL files is not supported by current driver`);
46
+ async executeDump(dump) {
47
+ throw new Error(`Executing SQL dumps is not supported by current driver`);
47
48
  }
48
49
  async onConnect() {
49
50
  const schemaGenerator = this.config.getExtension('@mikro-orm/schema-generator');
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.104",
4
+ "version": "7.0.0-dev.106",
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",
@@ -293,7 +293,7 @@ export class Configuration {
293
293
  metadataCache.enabled ??= useCache;
294
294
  this.options.clientUrl ??= this.platform.getDefaultClientUrl();
295
295
  this.options.implicitTransactions ??= this.platform.usesImplicitTransactions();
296
- if (metadataCache.enabled && !metadataCache.adapter) {
296
+ if (validate && metadataCache.enabled && !metadataCache.adapter) {
297
297
  throw new Error('No metadata cache adapter specified, please fill in `metadataCache.adapter` option or use the async MikroORM.init() method which can autoload it.');
298
298
  }
299
299
  try {
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.104';
128
+ static #ORM_VERSION = '7.0.0-dev.106';
129
129
  /* v8 ignore next */
130
130
  static dynamicImportProvider = (id) => import(id);
131
131
  /**