new filePersistence()
An file implementation of persistence.
Methods
-
<static> close() → {Promise}
-
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 collectionIDString keyValuesObject cursorBoolean If true, returns an iterable cursor.
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 collectionIDkeyReturns:
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 collectionIDString keyString Returns:
promise
- Type
- Object
-
<static> save(collectionID, key, data) → {Promise}
-
Save the provided data in a named collection
Parameters:
Name Type Description collectionIDString keyString dataObject Returns:
promise
- Type
- Promise