How to use the FLOAT function from sequelize

Find comprehensive JavaScript sequelize.FLOAT code examples handpicked from public code repositorys.

107
108
109
110
111
112
113
114
115
116
  balance: {type: Sequelize.BIGINT, defaultValue: 0}
})

const Order = sequelize.define('order', {
  amount: Sequelize.INTEGER,
  rate: Sequelize.FLOAT
})

// Hashlocks is like an evidence guarantee: if you have the secret before exp you unlock the action
// Primarily used in atomic swaps and mediated transfers. Based on Sprites concept
fork icon16
star icon80
watch icon23

+ 3 other calls in file

28
29
30
31
32
33
34
35
36
37
exports._CHAR      = Sequelize.CHAR;
exports._TEXT      = Sequelize.TEXT;
exports._INTEGER   = Sequelize.INTEGER;
exports._BIGINT    = Sequelize.BIGINT;
exports._BIGINT0   = Sequelize.BIGINT;
exports._FLOAT     = Sequelize.FLOAT;
exports._FLOAT0    = Sequelize.FLOAT;
exports._FLOAT1    = Sequelize.FLOAT;
exports._DOUBLE    = Sequelize.DOUBLE;
exports._DOUBLE0   = Sequelize.DOUBLE;
fork icon10
star icon15
watch icon25

+ 29 other calls in file

15
16
17
18
19
20
21
22
23
if (type instanceof Sequelize.ENUM) return enumProperty(attribute);
if (type instanceof Sequelize.BOOLEAN) return { type: addNull ? ['boolean', 'null'] : 'boolean' };
if (type instanceof Sequelize.INTEGER) return { type: addNull ? ['integer', 'null'] : 'integer', format: 'int32' };
if (type instanceof Sequelize.BIGINT) return { type: addNull ? ['integer', 'null'] : 'integer', format: 'int64' };

if (type instanceof Sequelize.FLOAT
  || type instanceof Sequelize.REAL) {
  return { type: addNull ? ['number', 'null'] : 'number', format: 'float' };
}
fork icon22
star icon0
watch icon15

+ 2 other calls in file

13
14
15
16
17
18
19
20
21
22
location: {
  type: Sequelize.ARRAY(Sequelize.FLOAT),
  allowNull: false
},
lat: {
  type: Sequelize.FLOAT
},
lng: {
  type: Sequelize.FLOAT
},
fork icon0
star icon0
watch icon2

+ 3 other calls in file