Skip to content

Using datatype SET in sequelize #4219

Closed

Description

@BernhardBehrendt

Using Version: 3.4.1

Saw there's a definition made in constants/types.js for datatype SET
js exports.SET = 0xf8; // aka SET

But it's not documented as an existing Datatype in Sequelize Documentation and I also get an Error if I want to use the type:
Error: Unrecognized data type for field columnName at null.<anonymous> (node_modules/sequelize/lib/model.js:86:13)

I used it similar like the ENUM type in the model setup:

columnName: { type: DataTypes.SET, values: aSetOptions, allowNull: false }

I get thy type working like this:

type: "SET('d', 'e', 'f')",

but is it planned to have a similar behave like the enum type in definition?

Activity

  1. janmeier commented on Jul 30, 2015

    @janmeier
    Member

    Sequelize doesn't have a constants/types file - you must have seen that in one of our dependencies :)

    There are no plans of supporting set right now - We've never had a request for it before. But it should be pretty easy to implement with #4186 (It seems like that PR is my respones to everything right now :D )

  2. added
    type: feature
    on Jul 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions