-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify a Validator #1057
Comments
You're right that the Rust driver doesn't expose a helper method for that; as far as I can tell, drivers for other languages don't either. It's not part of the MongoDB driver specification, as we generally think of it as an administrative action rather than a client application operation. That said, you're not the first to ask for this, so I'm going to re-open internal discussion on this :) While I appreciate the offer of a PR, I don't think we'd be able to accept one for new user-facing API surface. In the meanwhile, you can use the run_command method to directly run the |
Thanks for the example that might work. I am very surprised by the fact that this isn't something that you already had on the other drivers, makes sense that a new user-facing API needs to be done by your team. Is there a link to the internal discussion or any resources on this issue ? I am curious as to why it is the case, and also looking for how we should best use the validators. |
To have a validator set in a collection, I use the validator field in the CreateCollectionOptions.
But I need to be able to change the validation schema of an existing collection, and I found no way of doing it. (without dropping and recreating the Collection)
Is there a function/option I didn't find, or is the feature missing ?
If missing, could I propose the feature in a PR, and expect it's to be merged at some time ?
The text was updated successfully, but these errors were encountered: