通过mongoose在NodeJS中对MongoDB进行多重排序

时间:2016-02-09 03:53:31

标签: node.js mongodb mongoose aggregation-framework

集合A看起来像

@IBOutlet func moveView(sender: AnyObject) {
    UIView.animateWithDuration(0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: .AllowUserInteraction, animations: { /* animation */ }) { _ in /* completion */ }
}

@IBOutlet func moveBack(sender: AnyObject) {
    UIView.animateWithDuration(0.0, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: .BeginFromCurrentState, animations: { /* animation */ }) { _ in /* completion */ }
}

`

如何使用Mongoose API和MongoDB在nodejs的单个查询中首先返回活动状态的排序列表(按名称升序)和deactive状态的排序列表(按名称升序排序)?

0 个答案:

没有答案