PouchDB – Miscellaneous
In this chapter, we will discuss the concepts like, compaction and retrieval of bulk data from PouchDB. Compaction You can reduce the size of a database by removing the unused…
In this chapter, we will discuss the concepts like, compaction and retrieval of bulk data from PouchDB. Compaction You can reduce the size of a database by removing the unused…
You can synchronize the databases stored locally in PouchDB with those that are stored in CouchDB. In the previous chapter, we have seen how to replicate databases using PouchDB. There…
One of the most important features of PouchDB is replication, i.e. you can make a copy of a database. You can replicate either a PouchDB instance stored locally or a…
You can delete an attachment from PouchDB using the removeAttachment() method. Syntax Following is the syntax of the removeAttachment() method. To this method, we have to pass the document id, attachment id, and _rev…
You can retrieve an attachment from PouchDB using the getAttachment() method. This method always returns blob or buffer objects. Syntax Following is the syntax of the getAttachment(). To this method, we have to…
You can attach a binary object to a document using the putAttachment() method in PouchDB. Syntax Following is the syntax of the putAttachment(). To this method, we have to pass the document id,…
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,…
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…
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()…
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…