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 PouchDB #1355

Merged
merged 13 commits into from
Jun 28, 2018
Merged

Add PouchDB #1355

merged 13 commits into from
Jun 28, 2018

Conversation

midsorbet
Copy link
Contributor

@midsorbet midsorbet commented Jun 14, 2018

This PR will only add the base service so that we can start to integrate PouchDB with Angular (related to #48)

  • I did not move the couch service to the database folder because by doing that there will have to be a lot of one line changes to many files. I think it's better to do that when most of the services have been replaced by PouchDB.
  • Angular 6 removed some polyfills because of which PouchDB was not working so I had to add some polyfills as suggested on PouchDB not working with Angular 6.0.0 pouchdb/pouchdb#7263

private remoteDBs = [];

constructor() {
this.localDB = new PouchDB('local-pouchdb');
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this approach of creating one database for PouchDB and storing all dbs from Couch here will cause similar problems that we saw with BeLL-apps of id conflicts. @dogi wondering what you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could create one PouchDB instance per remote database if that's an issue.

@midsorbet midsorbet requested a review from paulbert June 22, 2018 03:18
@paulbert
Copy link
Member

@lawrencek0 I was about to merge this, and then realized you were returning from Array.forEach a few times which is always undefined. I went ahead and removed the returns in 8254074, but if you intended to return a value from those functions you can change that in an upcoming PR.

@paulbert paulbert merged commit e5ad8b8 into master Jun 28, 2018
@lmmrssa lmmrssa deleted the pouchdb branch June 28, 2018 06:33
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