API - AbstractRowset

Extends ObjectManager

The AbstractRowset class can be used without a table, you can use this when using an external API.

Methods

This function will be available for every object, this will clone the current object.

Returns Object: An exact copy of the current object

This method will return the total length of the rows.

Returns Number: The total rows in this rowset object.

This method will delete all the rows in the current rowset. This however is only done when the row isn't new.

Returns Promise: All the removed rows.

This is a private function to allow for config extending This method takes two parameters the first is the original config and the second will be appeneded to this one.

Parameters
Name Type Description
target Object The config object.
source Object The object to extend the config object.

This method will return the first row object in the rowset.

Returns Row: The first row object in the rowset

Return the command chain to run behaviors.

Returns CommandChain: CommandChain object.

Use this function to acquire a variable from config.js

Parameters
Name Type Description
key String Key to specify the config to return

Returns Object: The requested config value.

This method will return only the data from the Rowset object

Returns Promise: The data of the Rowset object

Use this function to acquire the identifier object

Returns ObjectIdentifier: Identifier object.

This is a alias of ObjectManager.getObject to use in the "this" context.

Parameters
Name Type Description
identifier String Identifier of the object to load
config Object|null Config to push to the object

Returns Promise: call ".then" to use the object when ready.

The AbstractRowset will expect no database so it will try to get its sibling Row object.

Returns Promise:

Every object called through getObject will go through this function. This will set the identifier and adds the behaviors (if any).

Parameters
Name Type Description
config Object Object with config values

Returns Promise: call ".then" to use the object when ready.

This method will return the last row object in the rowset.

Returns Row: The last row object in the rowset

This is the handler which will try to mixin functions from another object.

Parameters
Name Type Description
object Object The object to mix into the current object.

This method will save all the rows in the rowset. If one of the rows already exists, it will be updated.

Returns Promise: All the saved rows.

This method will set the data in the Rowset object, This accepts a array, for every entry it will create Row object and add it to the rows array

Parameters
Name Type Description
data Object The data to set on the object

Returns Promise: Returns the Rowset object with filled data