Back to Sequelize

NUMBER

static/v5/class/lib/data-types.js~NUMBER.html

latest2.8 KB
Original Source

publicclass| source

NUMBER

Extends:

lib/data-types.js~ABSTRACT → NUMBER

Direct Subclass:

DECIMAL, DOUBLE, FLOAT, INTEGER, REAL

Indirect Subclass:

BIGINT, MEDIUMINT, SMALLINT, TINYINT

Base number type which is used to build other types

Constructor Summary

| Public Constructor | | public |

constructor(options: Object)

| |

Public Constructors

publicconstructor(options: Object) source

Params:

| Name | Type | Attribute | Description | | options | Object | |

type options

| | options.length | string | number |

  • optional

|

length of type, like INT(4)

| | options.zerofill | boolean |

  • optional

|

Is zero filled?

| | options.unsigned | boolean |

  • optional

|

Is unsigned?

| | options.decimals | string | number |

  • optional

|

number of decimal points, used with length FLOAT(5, 4)

| | options.precision | string | number |

  • optional

|

defines precision for decimal type

| | options.scale | string | number |

  • optional

|

defines scale for decimal type

|