@mikro-orm/knex 6.0.0-dev.62 → 6.0.0-dev.64
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/SqlEntityRepository.d.ts +2 -6
- package/SqlEntityRepository.js +5 -11
- package/package.json +2 -2
package/SqlEntityRepository.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { EntityRepository } from '@mikro-orm/core';
|
|
|
4
4
|
import type { SqlEntityManager } from './SqlEntityManager';
|
|
5
5
|
import type { QueryBuilder } from './query';
|
|
6
6
|
export declare class SqlEntityRepository<T extends object> extends EntityRepository<T> {
|
|
7
|
-
protected readonly
|
|
8
|
-
constructor(
|
|
7
|
+
protected readonly em: SqlEntityManager;
|
|
8
|
+
constructor(em: SqlEntityManager, entityName: EntityName<T>);
|
|
9
9
|
/**
|
|
10
10
|
* Creates a QueryBuilder instance
|
|
11
11
|
*/
|
|
@@ -22,8 +22,4 @@ export declare class SqlEntityRepository<T extends object> extends EntityReposit
|
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
24
24
|
getEntityManager(): SqlEntityManager;
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
protected get em(): SqlEntityManager;
|
|
29
25
|
}
|
package/SqlEntityRepository.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SqlEntityRepository = void 0;
|
|
4
4
|
const core_1 = require("@mikro-orm/core");
|
|
5
5
|
class SqlEntityRepository extends core_1.EntityRepository {
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
8
|
-
this.
|
|
6
|
+
constructor(em, entityName) {
|
|
7
|
+
super(em, entityName);
|
|
8
|
+
this.em = em;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Creates a QueryBuilder instance
|
|
@@ -23,19 +23,13 @@ class SqlEntityRepository extends core_1.EntityRepository {
|
|
|
23
23
|
* Returns configured knex instance.
|
|
24
24
|
*/
|
|
25
25
|
getKnex(type) {
|
|
26
|
-
return this.getEntityManager().
|
|
26
|
+
return this.getEntityManager().getKnex();
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* @inheritDoc
|
|
30
30
|
*/
|
|
31
31
|
getEntityManager() {
|
|
32
|
-
return this.
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
get em() {
|
|
38
|
-
return this._em;
|
|
32
|
+
return this.em;
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
35
|
exports.SqlEntityRepository = SqlEntityRepository;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.64",
|
|
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.
|
|
69
|
+
"@mikro-orm/core": "~6.0.0-dev.64"
|
|
70
70
|
}
|
|
71
71
|
}
|