thedodd / wither

An ODM for MongoDB built on the official MongoDB Rust driver.
https://docs.rs/wither
Other
324 stars 40 forks source link

Support delete_many #67

Closed ndelvalle closed 3 years ago

ndelvalle commented 3 years ago

First of all, thanks for the lib, I am testing it in a new project and so far I like it! I came across the use case of deleting many attributes, are there any plans to support delete_many functionality or should I just use the native drive for this case?

thedodd commented 3 years ago

Hey @ndelvalle, glad that you like it so far! Looks like that is actually just missing functionality. We should definitely have that functionality.

You can currently do this by simple calling Model::collection(&db).delete_many(..).await. When we implement this functionality in Wither, it will do the exact same thing.

thedodd commented 3 years ago

If you have time to open a PR, it should be quite simple. Feel free to do so.

ndelvalle commented 3 years ago

@thedodd yeah that is what I am currently doing.

If you have time to open a PR, it should be quite simple. Feel free to do so.

Sure I'll try to make a PR 💪🏻

thedodd commented 3 years ago

Closed by #68 Closed by #72