Class: Depot

Depot

Class representing the Depot database.

Constructor

new Depot(config)

Create a new Depot instance.
Parameters:
Name Type Description
config Object The configuration options for the new Depot instance.
Source:

Methods

createCollection(config) → {Collection}

Create a new collection in the Depot instance.
Parameters:
Name Type Description
config Object The configuration options for the new Collection instance.
Source:
Returns:
The new instance of the Collection.
Type
Collection

register(collection)

Registers an external collection with the Depot instance.
Parameters:
Name Type Description
collection Collection The new Collection instance to register.
Source:
Throws:
  • Will throw if the collection is missing the `name` property.
  • Will throw if a collection already exists with the same name.