@mikro-orm/knex 6.0.0-dev.65 → 6.0.0-dev.67

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.65",
3
+ "version": "6.0.0-dev.67",
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.7.2"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "~6.0.0-dev.65"
69
+ "@mikro-orm/core": "~6.0.0-dev.67"
70
70
  }
71
71
  }
@@ -22,6 +22,7 @@ class QueryBuilderHelper {
22
22
  if (core_1.Utils.isRawSql(field)) {
23
23
  return this.knex.raw(field.sql, field.params);
24
24
  }
25
+ /* istanbul ignore next */
25
26
  if (typeof field !== 'string') {
26
27
  return field;
27
28
  }
@@ -516,12 +517,7 @@ class QueryBuilderHelper {
516
517
  if (fieldName instanceof core_1.RawQueryFragment) {
517
518
  return fieldName.sql;
518
519
  }
519
- if (this.isPrefixed(fieldName)) {
520
- ret = fieldName;
521
- }
522
- else {
523
- ret = alias + fieldName;
524
- }
520
+ ret = alias + fieldName;
525
521
  }
526
522
  else {
527
523
  const [a, ...rest] = field.split('.');
@@ -392,7 +392,7 @@ class SqlSchemaGenerator extends core_1.AbstractSchemaGenerator {
392
392
  }
393
393
  await core_1.Utils.runSerial(lines, line => this.driver.execute(line));
394
394
  }
395
- wrapSchema(sql, options = {}) {
395
+ wrapSchema(sql, options) {
396
396
  options.wrap ??= this.options.disableForeignKeys;
397
397
  if (!options.wrap || sql.trim() === '') {
398
398
  return sql;