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 – Create Batch You can create an array (batch) of documents in PouchDB using the db.bulkDocs() method. While creating documents, using this method if we do not provide _id values, on our behalf PouchDB generates unique ids for all the documents in the bulk. Syntax Following is the syntax of using the db.bulkDocs() method […]
PouchDB – Fetch Batch You can read/retrieve multiple/bulk documents from a database in PouchDB using the allDocs() method. Syntax Following is the syntax of using the db.allDocs() method of PouchDB. This method accepts an optional callback function. db.allDocs() Example Following is an example of retrieving all the documents in a database named my_database that is […]