new LokiFsStructuredAdapter()
Loki structured (node) filesystem adapter class. This class fulfills the loki 'reference' abstract adapter interface which can be applied to other storage methods.
- Source:
Methods
exportDatabase(dbname, dbref, callback)
Loki reference adapter interface function. Saves structured json via loki database object reference.
Parameters:
Name | Type | Description |
---|---|---|
dbname |
string | the name to give the serialized database within the catalog. |
dbref |
object | the loki database object reference to save. |
callback |
function | callback passed obj.success with true or false |
- Source:
generateDestructured(optionsopt) → {string|array}
Generator for constructing lines for file streaming output of db container or collection.
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
output format options for use externally to loki Properties
|
- Source:
Returns:
A custom, restructured aggregation of independent serializations.
- Type
- string | array
getPartition()
Generator for yielding sequence of dirty partition indices to iterate.
- Source:
loadDatabase(dbname, callback)
Loki persistence adapter interface function which outputs un-prototype db object reference to load from.
Parameters:
Name | Type | Description |
---|---|---|
dbname |
string | the name of the database to retrieve. |
callback |
function | callback should accept string param containing db object reference. |
- Source:
loadNextCollection(dbname, collectionIndex, callback)
Recursive function to chain loading of each collection one at a time. If at some point i can determine how to make async driven generator, this may be converted to generator.
Parameters:
Name | Type | Description |
---|---|---|
dbname |
string | the name to give the serialized database within the catalog. |
collectionIndex |
int | the ordinal position of the collection to load. |
callback |
function | callback to pass to next invocation or to call when done |
- Source: