Back to Sequelize

ENUM

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

latest872 B
Original Source

publicclass| source

ENUM

Extends:

lib/data-types.js~ABSTRACT → ENUM

An enumeration, Postgres Only

Example:

DataTypes.ENUM('value', 'another value')
DataTypes.ENUM(['value', 'another value'])
DataTypes.ENUM({
  values: ['value', 'another value']
})

Constructor Summary

| Public Constructor | | public |

constructor(args: ...any | {values: any[]} | any[])

| |

Public Constructors

publicconstructor(args: ...any | {values: any[]} | any[]) source

Params:

| Name | Type | Attribute | Description | | args | ...any | {values: any[]} | any[] | |

either array of values or options object with values array. It also supports variadic values

|