Class: ConfigurablePouchDBStoreFactory

QuickNav

ConfigurablePouchDBStoreFactory

PersistenceStoreFactory that creates PouchDB backed PersisteneStore instance based on specified configurations, for example, the adapter to be used for the PouchDB.

Constructor

new ConfigurablePouchDBStoreFactory(options)

Parameters:
Name Type Argument Description
options object <optional>
The optional options to be applied to every PouchDBPersistenceStore instances created by this factory.
Properties
Name Type Argument Description
adapter object <optional>
The adapter to be used for the underlying PouchDB. Application uses this option needs to make sure all necessary plugins and adapter are installed.
Properties
Name Type Argument Description
name string The name of the adapter to be used for the underlying PouchDB.
plugin object <optional>
The plugin associated with the adapter to be used by the underlying PouchDB.

Methods

createPersistenceStore(name, options) → {Promise.<PouchDBPersistenceStore>}

Parameters:
Name Type Argument Description
name string The name to be associated with the store.
options object <optional>
The configratuion options to be applied to the store.
Properties
Name Type Argument Description
version string <optional>
The version of the store.
Returns:
returns a Promise that is resolved to a PouchDB backed PersistenceStore instance with specified configurations.
Type
Promise.<PouchDBPersistenceStore>