Sequelizeのモデルのデータ型



Data Type Model Sequelize



詳細を見る 中国語のAPIドキュメントを続編する

SequelizeのModelのデータ型は、MySQLのデータ型に対応しています。

Sequelize.STRING // VARCHAR(255) Type: String Maximum: 65535 characters Sequelize.STRING(1234) // VARCHAR(1234) Type: variable length Maximum: 65535 characters Sequelize.TEXT // TEXT Type: String Maximum: 65535 characters Sequelize.TEXT('tiny') // TINYTEXT Type: String Maximum: 255 characters Sequelize.INTEGER // INTEGER Type: Integer Maximum: Range (-2147483648~2147483647) Sequelize.BIGINT // BIGINT Type: Integer Maximum: Range (+-9.22*10 to the 18th power) Sequelize.BIGINT(11) // BIGINT(11) Type: Integer Maximum: Range (+-9.22*10 to the 18th power) Sequelize.FLOAT // FLOAT Type: Single precision floating point type 8-bit precision (4 bytes) Sequelize.FLOAT(11) // FLOAT(11) Type: Single precision floating point type 8-bit precision (4 bytes) Sequelize.FLOAT(11, 12) // FLOAT(11,12) Type: Precision Floating Point 8-bit precision (4 bytes) m total number, d decimal places Sequelize.DOUBLE // DOUBLE Type: Double-precision floating-point 16-bit precision (8 bytes) Sequelize.DOUBLE(11) // DOUBLE(11) Type: Double-precision floating-point 16-bit precision (8 bytes) Sequelize.DOUBLE(11, 12) // DOUBLE(11,12) Type: Double-precision floating-point 16-bit precision (8 bytes) m total number, d decimal places Sequelize.DECIMAL // DECIMAL Type: Fixed point type Sequelize.DECIMAL(10, 2) // DECIMAL(10,2) Type: Fixed point type Parameter m<65 is the total number, d<30 and d