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 […]
Category Archives: pouchdb
PouchDB – Update Batch You can update an array of documents in PouchDB at once using the bulkDocs() method. To do so you need to create an array of documents where, each document contains _id, _rev and the values that are to be updated. Suppose the database named my_database that is stored locally in PouchDB […]
PouchDB – Delete Batch You can delete an array of documents in PouchDB at once using the bulkDocs() method. To do so you need to create an array of documents that are to be deleted where, each document should contain _id and _rev. In addition to these you have to add another key-value pair _deleted: […]