Collection

Collection

An extended Array to represent collections of models.

Constructor

new Collection()

Methods

(static) init(spell, rows, fields) → {Collection|Array}

Convert results by determining whether the result is instantiable or not.

Parameters:
Name Type Description
spell Spell
rows Array
fields Array
Returns:
Type:
Collection | Array

(async) save() → {Array.<Bone>}

Save the collection. Currently the changes are made concurrently but NOT in a transaction.

Returns:
Type:
Array.<Bone>

toJSON() → {Array.<Object>}

Override JSON.stringify behavior

Returns:
Type:
Array.<Object>

toObject() → {Array.<Object>}

Returns:
Type:
Array.<Object>