NOR与CaminteJS查询
我想用CaminteJS做一个查询,基本上只是想获得一个completed
工作,哪个status
既不running
也不queued
。 请帮忙,非常感谢!
Result.findOne() .where('job_id', job_id) .where('status').ne('running') .where('status').ne('queued') // looks like this line is overriding the last line .sort('-number') .run({}, callback);
我也尝试mongoose的方式,但仍然不工作。
.nor([{status: 'running'}, {status: 'queued'}]) // not a caminte api
.where('status').nin(['running', 'queued']) // not working
.where('status').ne('running').ne('queued') // not working