Discuss PouchDB PouchDB is an open source in-browser database API written in JavaScript. It is modelled after CouchDB – a NoSQL database that powers npm. Using this API, we can build applications that work offline and online. PouchDB uses WebSQL and IndexedDB internally to store the data. This tutorial discusses the basics of PouchDB along […]
Category Archives: pouchdb
PouchDB – Read Document You can read/retrieve the contents of a document in PouchDB using the db.get() method. Syntax Following is the syntax of using the db.get() method of PouchDB. This method accepts the document id and an optional callback function. db.get(document, callback) Example Following is an example of reading the contents of a document […]
PouchDB – Create Document You can create a document in PouchDB using the db.put() method. Syntax Following is the syntax of using the db.put() method of PouchDB. You can store the document that is to be created in PouchDB, in a variable and pass as a parameter to this method. In addition, this method also […]