Skip to content
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

feat(schema): add collectionOptions option to schemas #13513

Merged
merged 3 commits into from Jun 19, 2023

Conversation

vkarpov15
Copy link
Collaborator

Summary

MongoDB has added many options to createCollection() and schemas don't quite support all of them. In the interest of making sure developers can use schemas to configure their collections, this PR adds a collectionOptions option to schemas; this means you can specify options like storageEngine and validator in your schema.

Examples

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, though i agree with hafez to change the type to a mongodb type

types/schemaoptions.d.ts Outdated Show resolved Hide resolved
Co-authored-by: hasezoey <hasezoey@gmail.com>
@vkarpov15 vkarpov15 merged commit 643d55a into master Jun 19, 2023
22 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/schema-collection-options branch June 19, 2023 14:03
@vkarpov15 vkarpov15 added this to the 7.3.1 milestone Jun 19, 2023
@vkarpov15 vkarpov15 restored the vkarpov15/schema-collection-options branch June 19, 2023 14:04
@hasezoey hasezoey deleted the vkarpov15/schema-collection-options branch June 19, 2023 14:45
@hasezoey hasezoey restored the vkarpov15/schema-collection-options branch June 19, 2023 14:45
@hasezoey
Copy link
Collaborator

why was this reverted, wrong branch?

@vkarpov15
Copy link
Collaborator Author

Yeah wrong branch. Sorry about that.

@vkarpov15 vkarpov15 deleted the vkarpov15/schema-collection-options branch June 19, 2023 20:31
@vkarpov15 vkarpov15 modified the milestones: 7.3.1, 7.4.0 Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants