1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| Project.findAll({ where: { id: { $and: {a: 5} $or: [{a: 5}, {a: 6}] $gt: 6, $gte: 6, $lt: 10, $lte: 10, $ne: 20, $between: [6, 10], $notBetween: [11, 15], $in: [1, 2], $notIn: [1, 2], $like: '%hat', $notLike: '%hat' $iLike: '%hat' $notILike: '%hat' $overlap: [1, 2] $contains: [1, 2] $contained: [1, 2] $any: [2,3] }, status: { $not: false, } } }) Project.all() Project.findById Project.findByOne Project.findOrCreate Project.findAndCountAll Project.count() Project.max() Project.create() Project.save() Project.update() Project.destroy() User.bulkCreate([]) something.findOne({ order: [ 'name', 'username DESC', ['username', 'DESC'], sequelize.fn('max', sequelize.col('age')), [sequelize.fn('max', sequelize.col('age')), 'DESC'], [sequelize.fn('otherfunction', sequelize.col('col1'), 12, 'lalala'), 'DESC'], [sequelize.fn('otherfunction', sequelize.fn('awesomefunction', sequelize.col('col'))), 'DESC'] [{ raw: 'otherfunction(awesomefunction(`col`))' }, 'DESC'] ] }) Project.findAll({ limit: 10 }) Project.findAll({ offset: 8 }) Project.findAll({ offset: 5, limit: 5 })
|