Questions tagged [pouchdb]

PouchDB is a client side database solution built on top of browser provided databases (IndexedDB and WebSQL). It's implemented in JavaScript and aims to be as much compatible with CouchDB as possible. It can also replicate to and from CouchDB, so is a good fit for offline applications with synchronisation capabilities.

Inroduction

PouchDB is a client side database solution built on top of browser provided databases (IndexedDB and soon WebSQL). It's implemented in JavaScript and aims to be as much compatible with CouchDB as possible. It can also replicate to and from , so is a good fit for offline applications with synchronisation capabilities.

Browser Support

PouchDB supports all modern browsers, using IndexedDB under the hood and falling back to WebSQL where IndexedDB isn't supported. It is fully tested and supported in:

  • Firefox 29+ (Including Firefox OS and Firefox for Android)
  • Chrome 30+
  • Safari 5+
  • Internet Explorer 10+
  • Opera 21+
  • Android 4.0+
  • iOS 7.1+
  • Windows Phone 8+

PouchDB also runs in /PhoneGap, , Electron, and . It is framework-agnostic, and you can use it with , , , , or your framework of choice. There are many adapters, or you can just use PouchDB as-is.

How is PouchDB different from CouchDB?

PouchDB is also a CouchDB client, and you should be able to switch between a local database or an online CouchDB instance without changing any of your application's code.

However, there are some minor differences to note:

  • View Collation - CouchDB uses ICU to order keys in a view query; in PouchDB they are ASCII ordered.
  • View Offset - CouchDB returns an offset property in the view results. In PouchDB, offset just mirrors the skip parameter rather than returning a true offset.

Useful links

Related tags :

1528 questions
14
votes
3 answers

PouchDB check if local database exists

the question is simple but even through an exhaustive search through the internet and the pouchdb source I could not find a function to check if a local database exists. The use case for this would be to check if a local database is already existing…
Mythli
  • 5,995
  • 2
  • 24
  • 31
13
votes
2 answers

Syncing PouchDB offline to PostgreSQL

I am trying to make my web application work on offline mode by using pouchDB. but the backend database server i used is PostgreSQL (NoSQL). I couldn't find a way to Sync my PouchDB data to postgreSQL when my app came back to online. Can anyone…
isc
  • 526
  • 1
  • 5
  • 17
13
votes
1 answer

How to resolve conflicts with continuous replication

I'm new to both CouchDB and PouchDB and am using it to create a contact management system that syncs across mobile and desktop devices, and can be used offline. I am seeing that using PouchDB is infinitely easier than having to write a PHP/MySQL…
Colin Skow
  • 1,006
  • 12
  • 21
12
votes
1 answer

External access for PouchDB, error on sync

I'm creating an app which is pulling data down from a local CouchDB. However when I change the remote db url from localhost:5984 to my ip :5984 so that I can test from my mobile I get the following error when I sync from a remote…
Shardj
  • 1,800
  • 2
  • 17
  • 43
12
votes
1 answer

Local, file-based database for an Electron application

We are working on an application that will be offered both as a web-based and as a cross-platform desktop solution by means of Electron. Due to customer requirements, the desktop client cannot make use of "the cloud" to store data; all data should…
Sergi Papaseit
  • 15,999
  • 16
  • 67
  • 101
11
votes
2 answers

per user db (pouchdb/couchdb) & shared data - doable?

I have the following use case / application: a TODO app where users can: CRUD their on TODOs (I am using pouchdb/couchdb syncing). Pretty much based on Josh Morony's tutorial Now I want to add ability of users to "share" (post only, there is no…
Sergey Rudenko
  • 8,809
  • 2
  • 24
  • 51
11
votes
4 answers

typeof XService is not assignable to type 'FactoryProvider'. Property 'provide' is missing

I have an Angular 2 NgModule in a Ionic 2 mobile app defined like so: @NgModule({ declarations: [ MyApp, HomePage, ], imports: [ IonicModule.forRoot(MyApp) ], bootstrap: [IonicApp], entryComponents: [ MyApp, …
11
votes
2 answers

how to create a persistent offline database with electron and pouchdb

i am going to write a desktop-app that should be able to store its mass-data persistent and locally. i want to write that app with electron. later, i want to port the app to mobile. i am experimenting here with nativescript and the…
divramod
  • 1,454
  • 2
  • 20
  • 35
11
votes
3 answers

Best practise of using localstorage to store a large amount of objects

Currently I'm experimenting with localStorage to store a large amount of objects of same type, and I am getting a bit confused. One way of thinking is to store all the object in an array. But then for each read/write of a single object I need to…
Wudong
  • 2,320
  • 2
  • 32
  • 46
11
votes
2 answers

Offline Firebase

I am implementing an AngularJS web app with Firebase as a backend; it should work offline, too; multi-user sync issues should be very limited, since the app - by design - will only allow new data entries when offline. I understand Firebase has…
MarcoS
  • 17,323
  • 24
  • 96
  • 174
11
votes
3 answers

How do I use CouchDB as backend database to a MeteorJS app, instead of the default MongoDB?

Really would like to use CouchDB, and maybe make the Meteor app get data updates via Meteor Publish and Subscribe. But can't seem to figure out how to connect the Meteor app with CouchDB instead of the default MongoDB. Please help.
Anup Bishnoi
  • 412
  • 1
  • 4
  • 12
10
votes
1 answer

Sequential unique IDs for PouchDB

PouchDB best-practice recommendation is to use PUT instead of POST for creating a new document (analogous to a row in an rdbms) primarily because the latter generates a random ID that makes it inefficient for subsequent sorting of the data. PUT, on…
punkish
  • 13,598
  • 26
  • 66
  • 101
10
votes
3 answers

How to sync CouchDB and PostgreSQL

We have a web application built on RoR, its using postgresql, now we have to integrate mobile application with it, the mobile application have to be able to manage offline mode, so we need to sync information between web app and mobile app. The…
Pablo Solís
  • 109
  • 1
  • 4
10
votes
1 answer

Multiple remote databases, single local database (fancy replication)

I have a PouchDB app that manages users. Users have a local PouchDB instance that replicates with a single CouchDB database. Pretty simple. This is where things get a bit complicated. I am introducing the concept of "groups" to my design. Groups…
dipole_moment
  • 5,266
  • 4
  • 39
  • 55
9
votes
2 answers

Best approach on handling large dataset for offline-first Mobile Apps (PouchDB)

So I'm using Ionic v2 and using Pouch for mobile development using sqlite. Data coming from a REST API which contains something like this: { "record-id": "2332255", "record-name": "record-ABC-XTY", "record-items": [ { "item-id":…
Mike Shreek
  • 215
  • 2
  • 9