Come faccio a fare ciò con Sequelize?Sequenziare come trovare le righe con più clausole where e timestamp> NOW()
SELECT FROM sessions WHERE user_id = ? AND token = ? AND expires > NOW()
Ecco quello che sto cercando di fare (assumere Session
è un modello Sequelize):
Session.find({
where: {
user_id: someNumber,
token: someString,
//expires > NOW() (how do I do this?)
}
}).on('success', function (s) { /* things and stuff */ });
Grazie!
Ahh, il mio male ... credo che non mi rendevo conto che si potrebbe avere più di una sostituzione usando quel metodo. Grazie! – lakenen
Nessun problema :) Prego! – sdepold
puoi guardare http://stackoverflow.com/a/29952136/494954? :) – lakenen