fix(core): update
This commit is contained in:
parent
c241247845
commit
144a620f43
@ -213,6 +213,7 @@ tap.test('should ', async () => {})
|
|||||||
// close the database connection
|
// close the database connection
|
||||||
// =======================================
|
// =======================================
|
||||||
tap.test('should close the database connection', async (tools) => {
|
tap.test('should close the database connection', async (tools) => {
|
||||||
|
await testDb.mongoDb.dropDatabase();
|
||||||
await testDb.close();
|
await testDb.close();
|
||||||
try {
|
try {
|
||||||
await mongod.stop();
|
await mongod.stop();
|
||||||
|
@ -70,6 +70,15 @@ export interface IManager {
|
|||||||
}
|
}
|
||||||
return collectionFactory.getCollection(constructor.name, dbArg);
|
return collectionFactory.getCollection(constructor.name, dbArg);
|
||||||
}
|
}
|
||||||
|
public static get manager() {
|
||||||
|
let manager: TManager;
|
||||||
|
if (managerArg['db']) {
|
||||||
|
manager = (managerArg as TManager);
|
||||||
|
} else {
|
||||||
|
manager = (managerArg as TDelayed<TManager>)();
|
||||||
|
}
|
||||||
|
return manager;
|
||||||
|
}
|
||||||
public get manager() {
|
public get manager() {
|
||||||
let manager: TManager;
|
let manager: TManager;
|
||||||
if (managerArg['db']) {
|
if (managerArg['db']) {
|
||||||
|
@ -47,6 +47,7 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
|
|||||||
*/
|
*/
|
||||||
public static collection: SmartdataCollection<any>;
|
public static collection: SmartdataCollection<any>;
|
||||||
public collection: SmartdataCollection<any>;
|
public collection: SmartdataCollection<any>;
|
||||||
|
public static manager: TManager;
|
||||||
public manager: TManager;
|
public manager: TManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user