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

Improve MongoDB type check #148

Open
emmanuelbuah opened this issue Apr 16, 2020 · 0 comments
Open

Improve MongoDB type check #148

emmanuelbuah opened this issue Apr 16, 2020 · 0 comments

Comments

@emmanuelbuah
Copy link
Owner

emmanuelbuah commented Apr 16, 2020

We can not reasonably use an instanceof comparison to confirm that a given object is of type MongoDB since we may be using a different version of MongoDB than what a caller might be using. In this scenario, the check would fail.

We patched the checks using a required field in the IDbProperties object is set in #112. This required field is not a known field in MongoDB instance, thus it is arguably sane to check it
in this manner.

An ideal/better solution would be to make MongoDB a devDependency making it so the logic uses the consumer's own MongoDB package. This ticket tracks putting in place a better solution if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant