Class: OneHatData

OneHatData. OneHatData

OneHatData represents a collection of Repositories. It is the top-level object for this module. Normally used as a global singleton within an app, using the exported 'oneHatData' constant

new OneHatData()

Source:
OneHatData.js

Extends

  • EventEmitter

Members


setRepositoryGlobals

Sets global config settings that will be passed into all Repositories. Chainable.
Source:
OneHatData.js

createSchemas

Creates one or more Schemas at once. Chainable.
Source:
OneHatData.js

createRepository

Creates a new Repository.
Source:
OneHatData.js

_createRepository

Helper for createRepository.
Source:
OneHatData.js

getSchema

Get a Schema by its name
Source:
OneHatData.js

getSchemasBy

Get Schemas by a filter function
Source:
OneHatData.js

getAllRepositories

Get all Repositories
Source:
OneHatData.js

getRepository

Get the Repository bound to the Schema with the supplied name.
Source:
OneHatData.js

getRepositoriesBy

Get Repositories by a filter function
Source:
OneHatData.js

getRepositoryById

Get a Repository by its id
Source:
OneHatData.js

hasSchemaWithName

Checks whether a Schema with the supplied name exists
Source:
OneHatData.js

hasRepositoryWithId

Checks whether a Repository with the supplied ID exists
Source:
OneHatData.js

destroy

Destroy this object. - Removes child objects - Removes event listeners
Source:
OneHatData.js