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(document): add $timestamps() method to set timestamps for save(), bulkSave(), and insertMany() #12540

Merged
merged 2 commits into from Oct 8, 2022

Conversation

vkarpov15
Copy link
Collaborator

Fix #12117

Summary

Quick feature for 6.7 to make working with timestamps and bulkSave() + insertMany() easier. Right now, there's no way to configure timestamps for individual documents when using bulkSave() and insertMany(). This PR adds a $timestamps() method that sets the timestamps option for all future save(), bulkSave(), and insertMany().

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.

LGTM, just one documentation thing and a question

lib/document.js Outdated Show resolved Hide resolved
test/timestamps.test.js Show resolved Hide resolved
@hasezoey hasezoey modified the milestones: 6.6.7, 6.7 Oct 8, 2022
Co-authored-by: hasezoey <hasezoey@gmail.com>
@vkarpov15 vkarpov15 merged commit cb81723 into 6.7 Oct 8, 2022
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-12117 branch October 8, 2022 16:15
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

2 participants