API - Table

Extends TableAbstract

Default table class

Methods

This method will try to delete a row in the database.

Parameters
Name Type Description
row Row The row object to delete.

Returns Promise: The deleted data.

This function will filter the data based on the columns. And will check if the value is correct.

Parameters
Name Type Description
adapter Object The adapter object.
columns Object The object containing all the columns.
data Object The data object.

The getQuery method returns the query received from the associated adapter (default: mysql).

Returns Object: The queryBuilder object.

Initialize method to initialize the Table model

Parameters
Name Type Description
config Object|null Config object for the Table object

Returns Promise: The initialized Table object

This method will try to insert a row in the database

Parameters
Name Type Description
row Row The row object to insert in the database.

Returns Promise: The inserted data.

This method tries to get get a row or rowset from the table.

Parameters
Name Type Description
query String
mode Int Mode to get from the table.

Returns Promise: The data requested from the database.

This method will try to update a row in the database.

Parameters
Name Type Description
row Row The row object to update.

Returns Promise: The updated data.