How to use the NOW function from sequelize
Find comprehensive JavaScript sequelize.NOW code examples handpicked from public code repositorys.
GitHub: osmlab/to-fix-backend
45 46 47 48 49 50 51 52 53 54
defaultValue: 'open' }, lockedTill: { type: Sequelize.DATE, allowNull: false, defaultValue: Sequelize.NOW }, lockedBy: { type: Sequelize.STRING },
13
15
24
45 46 47 48 49 50 51 52 53 54
exports._BLOB = Sequelize.BLOB; exports._DATE = Sequelize.DATE; exports._DATE0 = Sequelize.DATE; exports._DATEONLY = Sequelize.DATEONLY; exports._TIME = Sequelize.TIME; exports._NOW = Sequelize.NOW; exports._UUID = Sequelize.UUID; exports._UUIDV1 = Sequelize.UUIDV1; exports._UUIDV4 = Sequelize.UUIDV4; exports._HSTORE = Sequelize.HSTORE;
10
15
25
+ 9 other calls in file
GitHub: dchester/dreamer
44 45 46 47 48 49 50 51 52 53
attributes.validate = attributes.validate || {}; attributes.max = value; }, default: function(column, attributes, value) { if (column.dataType == 'date' && value == 'now') { value = Sequelize.NOW; } attributes.defaultValue = value; }, fk: function(column, attributes, value) {
3
13
6
+ 2 other calls in file
GitHub: lext-7/sequelizex
58 59 60 61 62 63 64 65 66 67
} }; const Date = (defaultValue, allowNull) => { if (typeof defaultValue === 'undefined') { defaultValue = Sequelize.NOW; } return { type: Sequelize.DATE, allowNull,
1
5
2
sequelize.col is the most popular function in sequelize (1002 examples)