Class: filePersistence

filePersistence

new filePersistence()

An file implementation of persistence.

Source:

Methods

<static> close() → {Promise}

Source:
Returns:

promise

Type
Promise

<static> find(collectionID, keyValues, cursor) → {Promise}

Retrieve a piece of data from a named collection, based on the criteria, and returns a promise that contains found items when done.

Parameters:
Name Type Description
collectionID String
keyValues Object
cursor Boolean

If true, returns an iterable cursor.

Source:
Returns:

promise

Type
Promise

<static> findByID(collectionID, key) → {Promise}

Retrieve a piece of data from a named collection whose key is the one provided.

Parameters:
Name Type Description
collectionID
key
Source:
Returns:

promise

Type
Promise

<static> remove(collectionID, key) → {Object}

Remove a piece of data from a name collection, based to the provided key and return a promise that returns removed items when done.

Parameters:
Name Type Description
collectionID String
key String
Source:
Returns:

promise

Type
Object

<static> save(collectionID, key, data) → {Promise}

Save the provided data in a named collection

Parameters:
Name Type Description
collectionID String
key String
data Object
Source:
Returns:

promise

Type
Promise