@mikro-orm/knex 6.2.1-dev.9 → 6.2.1

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.
@@ -8,6 +8,7 @@ export declare const MonkeyPatchable: {
8
8
  MsSqlTableCompiler: any;
9
9
  MsSqlQueryCompiler: any;
10
10
  MsSqlDialect: any;
11
+ PostgresDialect: any;
11
12
  PostgresDialectTableCompiler: any;
12
13
  Sqlite3Dialect: any;
13
14
  Sqlite3DialectTableCompiler: any;
@@ -9,7 +9,7 @@ const client_1 = __importDefault(require("knex/lib/client"));
9
9
  // @ts-ignore
10
10
  const query_executioner_1 = __importDefault(require("knex/lib/execution/internal/query-executioner"));
11
11
  // @ts-ignore
12
- const mysql_1 = __importDefault(require("knex/lib/dialects/mysql"));
12
+ const mysql2_1 = __importDefault(require("knex/lib/dialects/mysql2"));
13
13
  // @ts-ignore
14
14
  const mysql_columncompiler_1 = __importDefault(require("knex/lib/dialects/mysql/schema/mysql-columncompiler"));
15
15
  // @ts-ignore
@@ -23,6 +23,8 @@ const mssql_querycompiler_1 = __importDefault(require("knex/lib/dialects/mssql/q
23
23
  // @ts-ignore
24
24
  const mssql_1 = __importDefault(require("knex/lib/dialects/mssql"));
25
25
  // @ts-ignore
26
+ const postgres_1 = __importDefault(require("knex/lib/dialects/postgres"));
27
+ // @ts-ignore
26
28
  const pg_tablecompiler_1 = __importDefault(require("knex/lib/dialects/postgres/schema/pg-tablecompiler"));
27
29
  // @ts-ignore
28
30
  const sqlite3_1 = __importDefault(require("knex/lib/dialects/sqlite3"));
@@ -39,13 +41,14 @@ const tablecompiler_1 = __importDefault(require("knex/lib/schema/tablecompiler")
39
41
  exports.MonkeyPatchable = {
40
42
  Client: client_1.default,
41
43
  QueryExecutioner: query_executioner_1.default,
42
- MySqlDialect: mysql_1.default,
44
+ MySqlDialect: mysql2_1.default,
43
45
  MySqlColumnCompiler: mysql_columncompiler_1.default,
44
46
  MySqlQueryCompiler: mysql_querycompiler_1.default,
45
47
  MsSqlColumnCompiler: mssql_columncompiler_1.default,
46
48
  MsSqlTableCompiler: mssql_tablecompiler_1.default,
47
49
  MsSqlQueryCompiler: mssql_querycompiler_1.default,
48
50
  MsSqlDialect: mssql_1.default,
51
+ PostgresDialect: postgres_1.default,
49
52
  PostgresDialectTableCompiler: pg_tablecompiler_1.default,
50
53
  Sqlite3Dialect: sqlite3_1.default,
51
54
  Sqlite3DialectTableCompiler: sqlite_tablecompiler_1.default,
@@ -1,5 +1,5 @@
1
- import MySql2Dialect from 'knex/lib/dialects/mysql2';
2
- export declare class MySqlKnexDialect extends MySql2Dialect {
1
+ import { MonkeyPatchable } from '../../MonkeyPatchable';
2
+ export declare class MySqlKnexDialect extends MonkeyPatchable.MySqlDialect {
3
3
  queryCompiler(): any;
4
4
  columnCompiler(): any;
5
5
  }
@@ -1,14 +1,10 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.MySqlKnexDialect = void 0;
7
- // @ts-ignore
8
- const mysql2_1 = __importDefault(require("knex/lib/dialects/mysql2"));
9
4
  const MySqlQueryCompiler_1 = require("./MySqlQueryCompiler");
10
5
  const MySqlColumnCompiler_1 = require("./MySqlColumnCompiler");
11
- class MySqlKnexDialect extends mysql2_1.default {
6
+ const MonkeyPatchable_1 = require("../../MonkeyPatchable");
7
+ class MySqlKnexDialect extends MonkeyPatchable_1.MonkeyPatchable.MySqlDialect {
12
8
  queryCompiler() {
13
9
  // eslint-disable-next-line prefer-rest-params
14
10
  return new MySqlQueryCompiler_1.MySqlQueryCompiler(this, ...arguments);
@@ -1,6 +1,6 @@
1
- import PostgresDialect from 'knex/lib/dialects/postgres';
2
1
  import type { Configuration } from '@mikro-orm/core';
3
- export declare class PostgreSqlKnexDialect extends PostgresDialect {
2
+ import { MonkeyPatchable } from '../../MonkeyPatchable';
3
+ export declare class PostgreSqlKnexDialect extends MonkeyPatchable.PostgresDialect {
4
4
  ormConfig: Configuration;
5
5
  tableCompiler(): any;
6
6
  }
@@ -1,13 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.PostgreSqlKnexDialect = void 0;
7
- // @ts-ignore
8
- const postgres_1 = __importDefault(require("knex/lib/dialects/postgres"));
9
4
  const PostgreSqlTableCompiler_1 = require("./PostgreSqlTableCompiler");
10
- class PostgreSqlKnexDialect extends postgres_1.default {
5
+ const MonkeyPatchable_1 = require("../../MonkeyPatchable");
6
+ class PostgreSqlKnexDialect extends MonkeyPatchable_1.MonkeyPatchable.PostgresDialect {
11
7
  ormConfig;
12
8
  tableCompiler() {
13
9
  // eslint-disable-next-line prefer-rest-params
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.2.1-dev.9",
3
+ "version": "6.2.1",
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",
@@ -63,9 +63,9 @@
63
63
  "sqlstring": "2.3.3"
64
64
  },
65
65
  "devDependencies": {
66
- "@mikro-orm/core": "^6.2.0"
66
+ "@mikro-orm/core": "^6.2.1"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.2.1-dev.9"
69
+ "@mikro-orm/core": "^6.0.0"
70
70
  }
71
71
  }
@@ -139,6 +139,7 @@ class QueryBuilderHelper {
139
139
  const inverseJoinColumns = prop.referencedColumnNames;
140
140
  const primaryKeys = prop.owner ? prop.joinColumns : prop2.referencedColumnNames;
141
141
  schema ??= prop.targetMeta?.schema === '*' ? '*' : this.driver.getSchemaName(prop.targetMeta);
142
+ cond = core_1.Utils.merge(cond, prop.where);
142
143
  return {
143
144
  prop, type, cond, ownerAlias, alias, table, schema,
144
145
  joinColumns, inverseJoinColumns, primaryKeys,