fix(core): update
This commit is contained in:
@ -235,9 +235,7 @@ export class SmartdataCollection<T> {
|
||||
await this.init();
|
||||
await this.checkDoc(dbDocArg);
|
||||
const identifiableObject = await dbDocArg.createIdentifiableObject();
|
||||
await this.mongoDbCollection.deleteOne(identifiableObject, {
|
||||
w: 1,
|
||||
});
|
||||
await this.mongoDbCollection.deleteOne(identifiableObject);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,8 +7,8 @@ export class SmartdataDbCursor<T = any> {
|
||||
// STATIC
|
||||
|
||||
// INSTANCE
|
||||
public mongodbCursor: plugins.mongodb.Cursor<T>;
|
||||
constructor(cursorArg: plugins.mongodb.Cursor<T>) {
|
||||
public mongodbCursor: plugins.mongodb.FindCursor<T>;
|
||||
constructor(cursorArg: plugins.mongodb.FindCursor<T>) {
|
||||
this.mongodbCursor = cursorArg
|
||||
};
|
||||
|
||||
|
@ -47,8 +47,6 @@ export class SmartdataDb {
|
||||
.replace('<dbname>', this.smartdataOptions.mongoDbName);
|
||||
|
||||
this.mongoDbClient = await plugins.mongodb.MongoClient.connect(finalConnectionUrl, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
maxPoolSize: 100,
|
||||
maxIdleTimeMS: 10,
|
||||
});
|
||||
@ -78,7 +76,7 @@ export class SmartdataDb {
|
||||
* @returns DbTable
|
||||
*/
|
||||
public async getSmartdataCollectionByName<T>(nameArg: string): Promise<SmartdataCollection<T>> {
|
||||
const resultCollection = this.smartdataCollectionMap.find((dbTableArg) => {
|
||||
const resultCollection = await this.smartdataCollectionMap.find(async (dbTableArg) => {
|
||||
return dbTableArg.collectionName === nameArg;
|
||||
});
|
||||
return resultCollection;
|
||||
|
Reference in New Issue
Block a user