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

Scope driver to Mongoose instance #12638

Closed
2 tasks done
vkarpov15 opened this issue Nov 2, 2022 · 0 comments
Closed
2 tasks done

Scope driver to Mongoose instance #12638

vkarpov15 opened this issue Nov 2, 2022 · 0 comments
Assignees
Milestone

Comments

@vkarpov15
Copy link
Collaborator

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Right now, we only support one driver per Mongoose module. require('./lib/driver') is a singleton.

Ideally, we'd instead have driver as a property on a Mongoose instance. So a new Mongoose instance new mongoose.Mongoose() can have a different driver.

I suspect this will also help clean up some circular dependencies and other build issues (like #12335).

Something to consider for 7.0.

@vkarpov15 vkarpov15 added this to the 7.0 milestone Nov 2, 2022
@vkarpov15 vkarpov15 self-assigned this Nov 2, 2022
vkarpov15 added a commit that referenced this issue Dec 27, 2022
… relying on driver to import Binary, ObjectId, Decimal128

Re: #12638
vkarpov15 added a commit that referenced this issue Dec 27, 2022
vkarpov15 added a commit that referenced this issue Jan 17, 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

No branches or pull requests

1 participant