API - Row

Extends RowAbstract

This class is a helper to structure data of the table, this will only hold one table row. Also when extended the extra functions can be used.

Methods

This method tries to remove an entity from the database.

Returns Promise:

Return the table assiciated to the Row.

Returns Object: Return the table of the current row.

This method will intialize the Row object.

Parameters
Name Type Description
config Object The configuration of the Row object

Returns Promise:

The load method will try to load the row from the database.

Returns Promise: The promise with the row object, or an empty row object.

This method will map the table columns to the values of the row object. Default table column values are supported.

Parameters
Name Type Description
columns Object All the columns from the table.

Returns Row: The current row object for chaining.

This method tries to save the object to the database, when it is new the object is inerted into the database if it exists the row is updated.

Returns Promise: Returns the returned data.