@mikro-orm/knex 6.0.0-dev.30 → 6.0.0-dev.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.0.0-dev.30",
3
+ "version": "6.0.0-dev.32",
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": "^5.6.8"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "~6.0.0-dev.30"
69
+ "@mikro-orm/core": "~6.0.0-dev.32"
70
70
  }
71
71
  }
@@ -361,7 +361,8 @@ class QueryBuilder {
361
361
  core_1.Utils.runIfNotEmpty(() => {
362
362
  const queryOrder = this.helper.getQueryOrder(this.type ?? enums_1.QueryType.SELECT, this._orderBy, this._populateMap);
363
363
  if (queryOrder) {
364
- return qb.orderByRaw(queryOrder);
364
+ qb.orderByRaw(queryOrder);
365
+ return;
365
366
  }
366
367
  }, this._orderBy);
367
368
  core_1.Utils.runIfNotEmpty(() => qb.limit(this._limit), this._limit != null);
@@ -610,11 +611,13 @@ class QueryBuilder {
610
611
  const ret = [];
611
612
  fields.forEach(field => {
612
613
  if (!core_1.Utils.isString(field)) {
613
- return ret.push(field);
614
+ ret.push(field);
615
+ return;
614
616
  }
615
617
  const join = Object.keys(this._joins).find(k => field === k.substring(0, k.indexOf('#')));
616
618
  if (join && type === 'where') {
617
- return ret.push(...this.helper.mapJoinColumns(this.type ?? enums_1.QueryType.SELECT, this._joins[join]));
619
+ ret.push(...this.helper.mapJoinColumns(this.type ?? enums_1.QueryType.SELECT, this._joins[join]));
620
+ return;
618
621
  }
619
622
  const [a, f] = this.helper.splitField(field);
620
623
  const prop = this.helper.getProperty(f, a);
@@ -753,7 +756,8 @@ class QueryBuilder {
753
756
  const aliasedField = `${fromAlias}.${fromField}`;
754
757
  const join = Object.keys(this._joins).find(k => `${aliasedField}#${this._joins[k].alias}` === k);
755
758
  if (join && this._joins[join] && this.helper.isOneToOneInverse(fromField)) {
756
- return this._populateMap[join] = this._joins[join].alias;
759
+ this._populateMap[join] = this._joins[join].alias;
760
+ return;
757
761
  }
758
762
  if (this.metadata.find(field)?.pivotTable) { // pivot table entity
759
763
  this.autoJoinPivotTable(field);
@@ -83,7 +83,7 @@ export declare class SqlSchemaGenerator extends AbstractSchemaGenerator<Abstract
83
83
  dropDatabase(name: string): Promise<void>;
84
84
  execute(sql: string, options?: {
85
85
  wrap?: boolean;
86
- }): Promise<undefined>;
86
+ }): Promise<void>;
87
87
  private wrapSchema;
88
88
  private createSchemaBuilder;
89
89
  private createTable;
@@ -360,7 +360,8 @@ class SqlSchemaGenerator extends core_1.AbstractSchemaGenerator {
360
360
  }
361
361
  if (this.platform.supportsMultipleStatements()) {
362
362
  const query = lines.join('\n');
363
- return void await this.driver.execute(query);
363
+ await this.driver.execute(query);
364
+ return;
364
365
  }
365
366
  await core_1.Utils.runSerial(lines, line => this.driver.execute(line));
366
367
  }