如何在 Sequelize 中使用 between 运算符?

How to use of between operator in Sequelize?

var conditionalData = {
    id: {
        $Between: [11, 15]
    },
    technician_id: technicianId
};
var attributes = ['id', 'service_start_time', 'service_end_time'];
userServiceAppointmentModel.findAll({
    where: conditionalData,
    attributes: attributes
}).complete(function (err, serviceAppointmentResponse) {
    if (err) {
        var response = constants.responseErrors.FETCHING_DATA;
        return callback(err, null);
    } else {
        if (serviceAppointmentResponse.length > 0) {
            var response = constants.responseErrors.NO_AVAILABLE_SLOTS_IN_YOUR_CALENDAR;
            return callback(response, null);
        }
    }
);

当我 运行 上面的查询时,它给我错误

"message": "ER_SP_DOES_NOT_EXIST: FUNCTION user_service_appointment.id does not exist"

$Between 应该是 $between.

如果您使用的是 旧版本 sequelize,您可能还需要删除 $