I have used this filter to check data before update but it doesn't work. How can i solve this problem.
And how can i get result if it cannot update data because condition is wrong ?
My code:
`const result = await inventoryCollection.updateOne(
inventory.id,
{
available_stock: inventory.available_stock - orderItem.quantity,
},
{
filter: {
available_stock: {
_eq: 0,
},
},
fields: ['available_stock'],
},
);`