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 collectionID
String keyValues
Object cursor
Boolean 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 collectionID
key
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 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 Returns:
promise
- Type
- Promise