Class: PouchDBUtils

(protected) PouchDBUtils()

Utility functions for interacting with PouchDB.

Constructor

(protected) new PouchDBUtils()

Source:

Methods

(static) getDocument(db, id) → {Promise}

Get a document from the database.

Parameters:
Name Type Description
db PouchDB

The database.

id string

The document ID.

Source:
Returns:

A promise that will be resolved when complete, or rejected
with an error.

Type
Promise

(static) putDocument(db, id, doc) → {Promise}

Put a document to the database.

Parameters:
Name Type Description
db PouchDB

The database.

id string

The document ID.

doc Object

The document.

Source:
Returns:

A promise that will be resolved when complete, or rejected
with an error.

Type
Promise

(static) removeDocument(db, id) → {Promise}

Remove a document from the database.

Parameters:
Name Type Description
db PouchDB

The database.

id string

The document ID.

Source:
Returns:

A promise that will be resolved when complete, or rejected
with an error.

Type
Promise