hamiltop / rethinkdb_ecto

Shim library for using Ecto with RethinkDB. Not a full adapter.
24 stars 4 forks source link

delete_all #4

Open AdamBrodzinski opened 8 years ago

AdamBrodzinski commented 8 years ago

One function that would be nice to have is delete_all. For example:

table("codes")
|> filter(lambda fn (code) -> code[:phone] == "+15554440000" end)
|> Repo.delete_all

Currently i'm just using the regular elixir_rethink syntax and that works great though! Though using Repo.run is a little awkward. Perhaps I should rename it so that it's not as confusing.

table("codes")
|> filter(%{phone: phone_num}) 
|> delete 
|> Repo.run

Pushing this app to production next week so i'm hoping i'll be able to provide more feedback in coming weeks as more and more of the service is migrated over.

Thanks! :beers: