Closed exAspArk closed 5 years ago
Hello, @exAspArk! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.
Totals | |
---|---|
Change from base Build 319: | 0.4% |
Covered Lines: | 302 |
Relevant Lines: | 350 |
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
lib/mongo_ecto.ex | 7 | 12 | 58.33% | ||
<!-- | Total: | 7 | 12 | 58.33% | --> |
Totals | |
---|---|
Change from base Build 319: | -1.07% |
Covered Lines: | 297 |
Relevant Lines: | 350 |
Thank you!
Hi!
When I call
Mongo.Ecto.truncate/2
, it fails with the following error in case if there is a MongoDB View in a database:My changes exclude Views from the collection list to avoid trying to truncate them since these are read-only collections. Initially, I wanted to use
list_collections/2
but it returns a list of collection names as strings, so it is not possible to filter out Views after that.MongoDB Views were introduced in version 3.4.