the data type
nested properties of data type
collection name
Determines whether or not the callbacks associated with each event should happen in an async fashion or not. Default is false, which means events are synchronous
Default clone method (if enabled) is parse-stringify.
Options to clone objects when inserting them.
In autosave scenarios we will use collection level dirty flags to determine whether save is needed. currently, if any collection is dirty we will autosave the whole database if autosave is configured. Defaulting to true since this is called from addCollection and adding a collection should trigger save.
Disable delta update object style on changes.
A map, with each property being an array of callbacks.
Transforms will be used to store frequently used query chains as a series of steps which itself can be stored along with the database.
Create a row filter that covers all documents in the collection.
Add a dynamic view to the collection
name of dynamic view to add
(optional) options to configure dynamic view with
reference to the dynamic view added
Alias of EventEmitter.on().
Adds a named collection transform to the collection
name to associate with transform
an array of transformation 'step' objects to save into the collection
Calculates the average numerical value of a field
the field name
average of property in all docs in the collection
Retrieve doc by Unique index
name of uniquely indexed property to use when doing lookup
unique value to search for
document matching the value passed
Chain method, used for beginning a series of chained find() and/or view() operations on a collection.
Ordered array of transform step objects similar to chain
Object containing properties representing parameters to substitute
(this) ResultSet, or data array if any map or join functions where called
Empties the collection.
Commit the transaction.
(Staging API) re-attach all objects to the original collection, so indexes and views can be rebuilt then create a message to be inserted in the commitlog
name of stage
Emits a particular event with the option of passing optional parameters which are going to be processed by the callback provided signatures match (i.e. if passing emit(event, arg0, arg1) the listener should take two parameters)
the name of the event
optional object passed with the event
Ensure rangedIndex of a field.
Ensure rangedIndex of a field.
Property to create an index on (need to look into contraining on keyof T)
Name of IndexType factory within (global?) hashmap to create IRangedIndex from
Name of Comparator within (global?) hashmap
Join two collections on specified properties
array of documents to 'join' to this collection
property name in collection
property name in joinData
(Optional) map function to use
options to data() before input to your map function
Result of the mapping operation
Returns all values of a field.
the field name
: the array of values
Returns all values of a field as numbers (if possible).
the field name
Find object by unindexed field by property equal to value, simply iterates and returns the first element matching the query
Clears all the changes.
Get by Id - faster than other methods because of the searching algorithm
$loki id of document you want to retrieve
Object reference if document was found, null if not, or an array if 'returnPosition' was passed.
Returns all changes.
Look up dynamic view reference from within the collection
name of dynamic view to retrieve reference of
A reference to the dynamic view with that name
(Staging API) create a stage and/or retrieve it
Retrieves a named transform from the collection.
name of the transform to lookup.
Adds a single object, ensures it has meta properties, clone it if necessary, etc.
the document to be inserted
quiet pre-insert and insert event emits
document or 'undefined' if there was a problem inserting it
Map Reduce operation
function to use as map function
function to use as reduce function
The result of your mapReduce operation
Finds the maximum value of a field.
the field name
the maximum value
Finds the maximum value and its index of a field.
the field name
Calculates the median of a field.
the field name
the median
Finds the minimum value of a field.
the field name
the minimum value
Finds the minimum value and its index of a field.
the field name
Calculates the mode of a field.
the field name
the mode
Adds a listener to the queue of callbacks associated to an event
the name(s) of the event(s) to listen to
callback function of listener to attach
the index of the callback in the array of listeners for a particular event
Remove a dynamic view from the collection
name of dynamic view to remove
Removes the listener at position 'index' from the event 'eventName'
the name(s) of the event(s) which the listener is attached to
the listener callback function to remove from emitter
Removes a named collection transform from the collection
name of collection transform to remove
Remove all documents matching supplied filter function.
the filter function
Rollback the transaction.
Enables/disables changes api.
Updates a named collection transform to the collection
name to associate with transform
a transformation object to save into collection
(Staging API) create a copy of an object and insert it into a stage
start the transation
Calculate the standard deviation of a field.
the field name
the standard deviation
Unique constraints contain duplicate object references, so they are not persisted. We will keep track of properties which have unique constraints applied here, and regenerate on load.
Option to activate a cleaner daemon - clears "aged" documents at set intervals.
Generated using TypeDoc
Collection class that handles documents of same type
LokiEventEmitter