Grid Model Interface

Definition of the model which is able to create, read, edit, remove and validate records of spreadsheets(grids).

Implementations

Constructor

  const abstractGridModel = new UIKernel.AbstractModels.Grid();

Methods

(abstract) async create

  async Object create(Object record)

Adds a record to the grid model data and returns an ID of the added record.


(abstract) async read

  async Array read(Object settings)

Retrieves grid records applying there filters, sorting, limits and offset.


(abstract) async getRecord

  async Object getRecord (Any id, string[] fields)

Get record by ID.


(abstract) async update

  async Array update(Object[][] changes)

Applies record changes.


(abstract) getValidationDependency

  string[] getValidationDependency(string[] fields)

Return fields(Array of string values) that need to be sent additionally to validate fields specified in passed parameters.


(abstract) async isValidRecord

  async ValidationErrors isValidRecord(Object record)

Validates a record.