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

Add option to pass hyperdb instance. #10

Closed
wants to merge 2 commits into from
Closed

Conversation

Frando
Copy link
Contributor

@Frando Frando commented Mar 23, 2018

This makes hyper-graph-db usable with subhyperdb

@coveralls
Copy link

coveralls commented Mar 23, 2018

Coverage Status

Coverage decreased (-0.2%) to 89.607% when pulling da752a1 on Frando:pass-db into ec0c2fc on e-e-e:master.

this.db = hyperdb(storage, key, opts)
opts = opts || {}
if (opts.db) {
this.db = opts.db
Copy link
Owner

Choose a reason for hiding this comment

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

By having db as an opts variable, it makes the primary argument storage redundant. So perhaps we could achieve this instead by making storage itself optionally be a hyperdb instance. The question then is how to differentiate it from a storage function. Any thoughts?
Also Hello! I have been meaning to get in touch since returning to Australia.

@Frando
Copy link
Contributor Author

Frando commented Mar 24, 2018

You're right. I think we could check on instanceof HyperDB. I'll try it out and update the PR soonisch.

Also hello back :-) I wanted to get in touch as well, still a little low on time but looking forward into collaboration here a lot.

@e-e-e e-e-e mentioned this pull request Mar 31, 2018
@e-e-e
Copy link
Owner

e-e-e commented Mar 31, 2018

closing this as it will be merged with #11

@e-e-e e-e-e closed this Mar 31, 2018
@e-e-e
Copy link
Owner

e-e-e commented Mar 31, 2018

this is now available from hyper-graph-db@0.3.1

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