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
0
votes
2 answers

$scope doesn't outside callback function

I have developed AngularJS application that integrates with PouchDB database. When trying to get info from the database, the $scope variable exists only inside the method. db.allDocs({include_docs: true, descending: true}, function(err, doc) { …
0
votes
1 answer

PouchDB.query() never has the callback called back

We are testing PouchDB , starts ok, syncs ok , db.allDocs() works ok, but : db.query(map, {}, function(err, data) {...}); never has the callback function called. Neither with an error, neither with data ... tested in chrome 35.0.1916.153…
Bossanova
  • 138
  • 2
  • 8
0
votes
1 answer

Get data from PouchDB callback function?

I need to get all the documents from PouchDB database and store them in $scope variable (AngularJS). Can anyone tell me how to get the 'doc' from the callback function? db.allDocs({include_docs: true, descending: true}, function(err, doc) { …
0
votes
1 answer

What is the significance of last_seq and update_seq in PouchDB replicate?

When I run db.replicate.to I get the following from the uptodate event: { "ok": true, "start_time": "2014-06-02T15:48:07.414Z", "docs_read": 0, "docs_written": 0, "doc_write_failures": 0, "errors": [], "last_seq":…
jrhicks
  • 14,759
  • 9
  • 42
  • 57
0
votes
1 answer

couchdb one query with LIKE AND EQUAL, or two queries?

I'm a Couchdb newbbie. I've already created a view for doing an "SQL like" on my Products (keys are all Code, and Description words). function (doc) { if (doc.type === 'product') { var words = { }; var text = doc.code + ' ' +…
Javier Castro
  • 321
  • 3
  • 12
0
votes
3 answers

PouchDB - Adding attachment to existing doc

Is it possible to add an attachment to an existing doc? When I use: db.putAttachment() I get an conflict error...
Nate
  • 7,606
  • 23
  • 72
  • 124
0
votes
1 answer

Monitor status of pouchdb replicate

If the user loses Internet or the server goes offline, how can I notifiy the user that live sync stopped? var localdb = new PouchDB('localdb') var remotedb = new PouchDB('http://localhost:5984/xyz'); localdb.replicate.to(remotedb, {live:…
jrhicks
  • 14,759
  • 9
  • 42
  • 57
0
votes
2 answers

Error with PouchDB: TypeError: angular.factory is not a function

I'm trying to figure out how to use PouchDB in AngularJS. I'm trying to follow these instructions https://github.com/wspringer/angular-pouchdb I think I'm having a problem understanding the syntax for creating factories and/or services. I get as far…
Jack Shultz
  • 2,031
  • 2
  • 30
  • 53
0
votes
1 answer

Angular and Pouch DB in Factory

I am trying to load the pouchdb client database on start of the application from within a javascript file but the database does not get created. There are no console errors in the debugger. When I try to debug, it seems to fail on this line below…
Nate
  • 2,044
  • 4
  • 23
  • 47
0
votes
1 answer

Sync with live: false

I have a running copy of the Getting Started Guide. It syncs perfectly with a CouchDB server (at couchappy.com). So far so good. I need the sync to happen only with a user action (ie. a user hits a button). So I added a button to the markup and…
jeffm
  • 1
0
votes
2 answers

Is it really helpful to load data from local database creating using pouchDB?

Is it really helpfull to load data from local database creating using pouchDB ? please share experience if you used pouchDB. pros n cons. We have a website which load 1,00,000 records on page load, and then perform many query on this data, What I…
user3379655
  • 258
  • 1
  • 5
  • 17
0
votes
1 answer

PouchDB not working in Chrome (kind of)

I am trying to make PouchDB working for two days now - some simple stuff works some doesn't. It was hard to isolate the cause but I finally managed to isolate one problem - is it problem with IndexDB destroying database and creating again OR…
Yoorek
  • 1,003
  • 1
  • 12
  • 30
0
votes
1 answer

Can't destroy PouchDB

I'm having trouble deleting my PouchDB to reset my jQuery Mobile app. (Equivalent jsFiddle: http://jsfiddle.net/bYR8c/2/) I have in app.js: var db = new PouchDB('petrolog'); function resetDb(){ db.destroy(function(err, info) {…
CristosLC
  • 412
  • 4
  • 16
0
votes
1 answer

PouchDB initialisation pattern

I'm creating an offline app using PouchDB. Right now I'm loading the db and posting a couple of rows, but this means that the rows are getting duplicated each time I load. Is there a standard pattern for initialising and pre-populating a db? What…
Dan
  • 3,229
  • 2
  • 21
  • 34
0
votes
1 answer

Trouble storing PouchDB data in a variable

I don't know why, but for some reasons I have trouble getting data from my indexedDB using PouchDB and storing that data in a variable. I have a function that fetches all the data from my database, like this: load_all = function() { var database =…
T.Lange
  • 576
  • 1
  • 4
  • 16
1 2 3
99
100