How to use the DATE function from sequelize

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

108
109
110
111
112
113
114
115
116
117
  lang: Sequelize.STRING,
  statuses_count: Sequelize.INTEGER,
  // NOTE: This field doesn't exactly match the name of the corresponding field
  // in the Twitter User object ('created_at'), because that matches too closely
  // the Sequelize built-in createdAt, and would be confusing.
  account_created_at: Sequelize.DATE
});

/**
 * BtUser, shorthand for Block Together User. Contains the user-related data
fork icon74
star icon332
watch icon25

19
20
21
22
23
24
25
26
27
28

// Define your models
var database = new Sequelize('database', 'root', 'password');
var User = database.define('User', {
  username: Sequelize.STRING,
  birthday: Sequelize.DATE
});

// Initialize server
var server, app;
fork icon36
star icon183
watch icon8

44
45
46
47
48
49
50
51
52
53
  fatcot: Sequelize.STRING,
  ptoexe: Sequelize.STRING,
  codisi: Sequelize.STRING,
  dismes: Sequelize.STRING,

  datven: Sequelize.DATE
}, {
  tableName: 'quote',

  createdAt: 'created_at',
fork icon15
star icon86
watch icon11

41
42
43
44
45
46
47
48
49
50
exports._REAL      = Sequelize.REAL;
exports._REAL0     = Sequelize.REAL;
exports._REAL1     = Sequelize.REAL;
exports._BOOLEAN   = Sequelize.BOOLEAN;
exports._BLOB      = Sequelize.BLOB;
exports._DATE      = Sequelize.DATE;
exports._DATE0     = Sequelize.DATE;
exports._DATEONLY  = Sequelize.DATEONLY;
exports._TIME      = Sequelize.TIME;
exports._NOW       = Sequelize.NOW;
fork icon10
star icon15
watch icon25

+ 19 other calls in file

38
39
40
41
42
43
44
45
46
47

if (type instanceof Sequelize.CHAR
  || type instanceof Sequelize.STRING
  || type instanceof Sequelize.TEXT
  || type instanceof Sequelize.UUID
  || type instanceof Sequelize.DATE
  || type instanceof Sequelize.DATEONLY
  || type instanceof Sequelize.TIME) {

  const schema = { type: addNull ? ['string', 'null'] : 'string' };
fork icon22
star icon0
watch icon15

+ 2 other calls in file

108
109
110
111
112
113
114
115
116
117
case 'array':
    return Sequelize.TEXT;
case 'object':
    return Sequelize.TEXT('medium');
case 'date':
    return Sequelize.DATE;
case 'number':
    return Sequelize.DOUBLE;
case 'boolean':
    return Sequelize.BOOLEAN;
fork icon6
star icon0
watch icon6