Can't destroy documents based on query object
According to the docs for destroy it is possible to pass universal options to the destroy function. So Itried passing {document: true} to enable document handling for my destroy call:
const collection = 'myTableName';
database[collection]
.destroy({'date <': '2019-10-01', 'status': 'O'}, {document: true})
.catch(/* error handling here */);
But that gets me error: column date does not exist
I also tried it wihtout the {document: true} but it gives the same result.
It is not entirely clear to me how I can use destroy in conjunction with a document table and there doesn't seem to be a destroyDoc function available. Is there any way to destroy items in a document table based on a query object? How should I go about this?
I am using node 12, Massivejs 6.1.0 and Postgres 11.
Edited by Dian Fay