DataType

DataType

new DataType()

Example:
const { STRING, INTEGER, BIGINT, DATE, BOOLEAN } = app.model;
class User = app.model.define('User', {
  login: STRING,
});

Methods

(static) is(params) → {boolean}

Check if params is instance of DataType or not

Parameters:
Name Type Description
params *
Returns:
Type:
boolean

cast()

cast raw data returned from data packet into js type

uncast()

uncast js value into database type with precision