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

Offline / Online Data Synchronization Design (Javascript)

I'm currently in the process of writing an offline webapp using all the html5 goodies for offline support. However I'm starting now to think about writing the sync module that will ensure that any offline data gets sent to the server and server…
gatapia
  • 3,574
  • 4
  • 40
  • 48
34
votes
2 answers

Using PouchDB with MongoDB

I've never used CouchDB. I want to use PouchDB on my client app but I'm not sure if it can be integrated with MongoDB because Pouch was designed to be used with CouchDB. Although my API is written in PHP I'm not using any sort of REST API as in…
astroanu
  • 3,901
  • 2
  • 36
  • 50
27
votes
2 answers

How to have complete offline functionality in a web app with PostgreSQL database?

I would like to give a web app with a PostgreSQL database 100% offline functionality. In an ideal case the database should be completely replicated in the browser per user, and synchronized when online. So that the same code can be used to talk to…
Blix
  • 273
  • 3
  • 4
20
votes
3 answers

Mobile app using PouchDB-CouchDB and MySQL

I'm developing a mobile app wrapped in Cordova that runs alongside our web-based application, based on PHP & MySQL. The mobile app uses local-storage & gets data via a layer of services that have been written to exchange data between the mobile app…
trace
  • 361
  • 1
  • 4
  • 9
20
votes
9 answers

how to add cors in couchDB -- No 'Access-Control-Allow-Origin' header is present on the requested resource

I am trying to create a html file which synchronize data from a pouchDb to couchDb ..but iam getting the following error in chrome console. Uncaught TypeError: Cannot call method 'addEventListener' of null OPTIONS http://localhost:5984/todos/ 405…
ess
  • 663
  • 3
  • 9
  • 17
20
votes
3 answers

Differences between PouchDB and CouchBase Lite + LiteGap

In a Phonegap offline/online project: What is the difference between using PouchDB and using CouchBase Lite with the new LiteGap plugin? Are they two different solutions to the same problem? Can the PouchDB API be used to interact with a local…
TMichel
  • 4,336
  • 9
  • 44
  • 67
19
votes
6 answers

pouchdb delete allDocs javascript

I am new in pouchdb and I can't understand the API. I want to know what is the best way to delete all documents with a javascript code. I try many things but nothing seams to work. Do I have to use some options in the allDocs method…
K20
  • 197
  • 1
  • 6
18
votes
3 answers

How to import/export database from PouchDB

How to import/export database from local PouchDB database? I need save my local database and open it in different platform. There is no CouchDB on server side.
pZCZ
  • 183
  • 2
  • 11
17
votes
3 answers

Can I create multiple collections per database?

Switching from mongo to pouchdb (with Cloudant), i like the "one database per user" concept, but is there a way to create multiple collections/tables per database ? Example - Peter - History - Settings - Friends - John …
Abel Chalier
  • 629
  • 6
  • 14
16
votes
3 answers

PouchDB security

What's the best security practice to follow while using PouchDB on the client-side to access a remote server? The example on https://pouchdb.com/getting-started.html syncs with the remote server with the code: var remoteCouch =…
Emre Sokullu
  • 161
  • 1
  • 4
16
votes
3 answers

PouchDB structure

i am new with nosql concept, so when i start to learn PouchDB, i found this conversion chart. My confusion is, how PouchDB handle if lets say i have multiple table, does it mean that i need to create multiple databases? Because from my…
Sufi
  • 203
  • 3
  • 9
14
votes
3 answers

Can I use CouchDB mobile as a replacement for localStorage?

I have an existing web app that runs offline (using HTML5 cache manifest). I am storing data in localStorage. I am going to hit the 5Mb limit for localStorage. Can I use CouchDB as a local db, effectively replacing localStorage with the CouchDB…
Journeyman
  • 10,011
  • 16
  • 81
  • 129
14
votes
2 answers

pouchdb db.login is not a function

Tried using these imports import PouchDB from 'pouchdb'; import PouchDBAuth from 'pouchdb-authentication'; PouchDB.plugin(PouchDBAuth) Module ''pouchdb-authentication'' has no default export is the error generated while using these…
shalini
  • 171
  • 1
  • 8
14
votes
1 answer

Force ignore one dependency's dependency from being installed by npm/yarn

My nodejs project uses some libraries. One library pouchdb will try to install quite a lot of dependencies. There is one called leveldown, which will try to download Node.js header from Internet and then rebuild everything from scratch. Actually I…
stanleyxu2005
  • 8,081
  • 14
  • 59
  • 94
14
votes
1 answer

Is creating multiple PouchDB databases on the same application considered bad design?

I come from a Mysql background and I'm using Pouchdb now. I'm used to the SQL pattern of having 1 database and many tables per app. In pouchDB it's different, because data is not stored in tables but in documents. So, in my app, I have a database…
sigmaxf
  • 7,998
  • 15
  • 65
  • 125
1
2 3
99 100