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

Option to set database name respectively split data into multiple databases #173

Open
PiTomar opened this issue Dec 3, 2019 · 1 comment

Comments

@PiTomar
Copy link
Contributor

PiTomar commented Dec 3, 2019

Hello,
is there an option to set a specific database name?
I would like to split my data in two different databases.

In the hoodie-client example there is no db-name option an everything is stored in _pouch_hoodie and _poch_store.
In the store-client example there is a db name parameter:

var Store = require('@hoodie/store-client')
var store = new Store('mydbname', {
  PouchDB: require('pouchdb'),
  remote: 'http://localhost:5984/mydbname'
})

So is there a way to set the db name also in the hoodie-client api?
Or could I combine the store-client initialization with the hoodie-client init or is there maybe an option to set the db name in the PouchDB.default?

Thanks

@gr2m
Copy link
Member

gr2m commented Dec 3, 2019

Hoodie is depending on having the single database that is mirrored on the server. For example, it gets cleaned up when you sign out.

If you want to create a 2nd database locally, you'd need to take care of all that yourself. I'd suggest to use @hoodie/store-client directly to do that

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

2 participants