This mixin contains client specific code for the Barefoot.DataStore component.
Code for deserializing a DataStore is placed here.
Barefoot. | This mixin contains client specific code for the Barefoot.DataStore component. |
Functions | |
parse | Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure. |
function parse( serializedStore )
Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.
Please make sure you registered all model and collection types with Barefoot.DataStore.registerModel and Barefoot.DataStore.registerCollection. Otherwise parse will throw an error as soon as i tries to deserialize such an object.
(Object) serializedStore | An object contained the serialized representation of a DataStore |
Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.
function parse( serializedStore )
Serializes all models and collections of this DataStore into a plain JavaScript object.
function toJSON()
Registers a specific Barefoot.Model or Barefoot.Collection with the given identifier.
function registerModel( identifier, model )
An alias for registerModel.
function registerCollection( identifier, model )