3.2.0 • Published 5 years ago

multidatastore v3.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

multidatastore

A wrapper around multiple data stores.

multidatastore.create(drivers)

Creates an MDS instance.

Kind: static method of multidatastore
Summary: Creates an MDS instance.

ParamTypeDescription
driversArray.<driver>The initial MDS drivers to initialize with.

multidatastore.singleton(owner, options)

Creates a singleton MDS based on an owner. Useful for ensuring only one instance is created when accessing from multiple places in your code.

Kind: static method of multidatastore
Summary: Creates a singleton MDS instance.

ParamTypeDescription
ownerobjectThe owning object.
optionsobjectcreation options

multidatastore~Multi_Data_Store

multidatastore Interface

Kind: inner interface of multidatastore

Multi_Data_Store.init(drivers)

Initialize the MDS.

Kind: static method of Multi_Data_Store

ParamTypeDescription
driversArray.<driver>A an array of datastore drivers.

Multi_Data_Store.add_driver(driver)

Add a datastore driver to the MDS.

Kind: static method of Multi_Data_Store

ParamTypeDescription
driverdriverA datastore driver.

Multi_Data_Store.remove_driver(driver)

Removes the given driver from the MDS.

Kind: static method of Multi_Data_Store

ParamTypeDescription
driverdriverA datastore driver.

Multi_Data_Store.stop()

Stops the MDS, calling .stop() on all drivers.

Kind: static method of Multi_Data_Store

Multi_Data_Store.put(object, options)

Put an object into the MDS.

Kind: static method of Multi_Data_Store

ParamTypeDescription
objectobjectThe object to store.
optionsobjectstorage options

Multi_Data_Store.get(id, options, driver)

Get an object from the MDS.

Kind: static method of Multi_Data_Store

ParamTypeDescription
idstringThe object id.
optionsobjectstorage options
driverdriveroptionally get from a specific datastore driver

Multi_Data_Store.find(criteria, options, driver)

Searches the MDS for an object based on specified criteria. Iterates through the available drivers looking for one that supports the .find() method.

Kind: static method of Multi_Data_Store
Summary: Find an object in the MDS.

ParamTypeDescription
criteriaobjectAn object containing search criteria.
optionsobjectsearch options
driverdriveroptionally search a specific datastore driver

Multi_Data_Store.find_by(criteria, options, driver)

Searches the MDS for an object based on a particular field. Iterates through the available drivers looking for one that supports the .find_by() method. This is useful for datastores that support special query indexing on a per-field basis.

Kind: static method of Multi_Data_Store
Summary: Find an object in the MDS using a specific field.

ParamTypeDescription
criteriaobjectAn object containing search criteria.
optionsobjectsearch options
driverdriveroptionally search a specific datastore driver

Multi_Data_Store.del(id, options)

Deletes an object from the MDS.

Kind: static method of Multi_Data_Store
Summary: Delete an object in the MDS.

ParamTypeDescription
idstringThe object id.
optionsobjectdeletion options

Multi_Data_Store.del_by(criteria, options, driver)

Deletes from the MDS based on specified critera. Iterates through the available drivers looking for one that supports the .del_by() method. This is useful for datastores that support special query indexing on a per-field basis.

Kind: static method of Multi_Data_Store
Summary: Delete obect(s) from the MDS based on given criteria.

ParamTypeDescription
criteriaobjectAn object containing search criteria.
optionsobjectsearch options
driverdriveroptionally search a specific datastore driver
3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

6 years ago

2.10.0

6 years ago

2.9.1

6 years ago

2.9.0

6 years ago

2.8.0

6 years ago

2.7.0

6 years ago

2.6.0

6 years ago

2.5.0

6 years ago

2.4.2

6 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.1

6 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago