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
9
votes
3 answers

Is it possible to create offline first apps with React-Native?

From what I've understood offline first apps need a way to tell if the user is connected; if not, it stores changes locally and syncs with the remote server when online. The way I've found to do this with web apps is by using pouchdb on the client…
HairLessDude
  • 279
  • 2
  • 20
9
votes
2 answers

PouchDB sync authorization?

How do I ensure that the current user has authorization to access a CouchDB database via PouchDB? From my experimentation, calling the new PouchDB() method with the CouchDB database name grants you access to that data. Setting require_valid_user to…
Corey Quillen
  • 1,566
  • 4
  • 24
  • 52
8
votes
2 answers

Chrome on Android: Granted Quota for IndexedDB suddenly almost 0

Was there recently a change in Android Chrome's quota management for IndexedDB? I'm using PouchDB with adapter IndexedDB in an Ionic 3 Cordova app. It went pretty smooth for the last 6 months. But within the last 5 days, I received a significant…
ntaso
  • 614
  • 6
  • 12
8
votes
0 answers

Django REST api offline synchronization with PouchDB

I am developing an application which is used by multiple clients and the main goal of the app is to be used online. But a specific requirement is, it should be able to work offline too (only for a single client(s) in an emergency situation and for…
8
votes
1 answer

Can $in / $or queries use indexes?

I'm playing with Mango queries on a CouchDB 2.0 instance, through the fantastic pouchdb-find. A few times I got the dreaded no matching index found, create an index to optimize query time warning even though I was using indexed fields. Just now I…
Ronan Jouchet
  • 1,303
  • 1
  • 15
  • 28
8
votes
2 answers

PouchDB delete data on device without affecting remote sync

Right now I am replicating my entire device database over to my remote database. Once that is complete, I grab all my data that is not older than 1 month from my remote database, using a filter, and bring it to my device. FILTER { _id:…
bryan
  • 8,879
  • 18
  • 83
  • 166
8
votes
1 answer

Couchdb external authentication

I am developing a family of utility apps where each app could be available on desktop, mobile and the web. After some research I decided to go with pouchdb on the client and couchdb on the server to provide offline sync. A user would be able to…
cubiclewar
  • 1,569
  • 3
  • 20
  • 37
8
votes
2 answers

PouchDB authentication triggering CORS preflight request

The following code (using the PouchDB Authentication plugin) fails because it triggers the browser to send a CORS preflight request, and CouchDB does not support the OPTIONS HTTP method. var db = new…
rvighne
  • 20,755
  • 11
  • 51
  • 73
8
votes
5 answers

How do I use pouchdb with typescript?

I am trying to use pouchdb with Typescript. I cannot link to the pouchdb module. import { PouchDB } from "pouchdb" reports that it cannot find module pouchdb, even though it is in node_modules. I also cannot find the appropriate typings for…
user2302244
  • 843
  • 2
  • 11
  • 27
8
votes
2 answers

How to limit PouchDB revisions or permanently delete revisions

I'm using PouchDB with websql adapter or a cordova app (I'm using the sqlite plugin). N.B. this database is completely local and I have no need for it to sync. For my specific application (the database is used to track API calls), I can update the…
Kholofelo
  • 694
  • 9
  • 15
8
votes
1 answer

Is it possible to use GraphQL with an offline mobile database like SQLite or PouchDB

I am looking at Relay / GraphQL. Looks great to use with React but my main concern is whether it is possible to use GraphQL in an offline mode. In my Hybrid app built currently using Ionic Framework (AngularJs based), am planning to shift out to…
Amrudesh
  • 305
  • 4
  • 6
8
votes
1 answer

Ionic framework app work offline and syncing data with mongoDB

I am developing an app in ionic framework and using MongoDB as database. I want to work my app on offline and sync the data to my database. I find PouchDB which works as a local storage and sync with CouchDB. But I also find, there is no way to sync…
fyasir
  • 2,924
  • 2
  • 23
  • 36
8
votes
1 answer

Do I have to replace Mysql with CouchDB if I am using PouchDB for mobile app?

Currently we have a web app that uses mysql database which is accessd via PHP. We are planning to have a mobile app using Ionic Framework that will have offline access and also sync with the web app when ever user comes online through mobile. I…
Abhinav
  • 8,028
  • 12
  • 48
  • 89
8
votes
5 answers

Are there any document storages on react native?

It would be great to have something similar to PouchDB. Current key-value storage (AsyncStorage) is definitely not enough to store and query data.
mrded
  • 4,674
  • 2
  • 34
  • 36
8
votes
2 answers

ionic framework sync data and work offline

I'm developing an app using ionic framework, and it will fetch some data from an API which was built using laravel, save it in a database so when the user is offline he can continue use the app, I did a little research on the internet and found a…
Stack two
  • 531
  • 2
  • 12
  • 27