implement mongo removeDoc

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-10-26 19:51:49 +02:00
parent 10621de2e3
commit 096fe284da
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0

View File

@ -128,8 +128,10 @@ class MongoAdapter extends MongoAdapterBase {
return {} return {}
} }
protected txRemoveDoc (tx: TxRemoveDoc<Doc>): Promise<TxResult> { protected override async txRemoveDoc (tx: TxRemoveDoc<Doc>): Promise<TxResult> {
throw new Error('Method not implemented.') const domain = this.hierarchy.getDomain(tx.objectClass)
await this.db.collection(domain).deleteOne({ _id: tx.objectId })
return {}
} }
protected txMixin (tx: TxMixin<Doc, Doc>): Promise<TxResult> { protected txMixin (tx: TxMixin<Doc, Doc>): Promise<TxResult> {