拉力查找查询&排序字段
两个问题有些相互关联:
在“find”/“findAll”查询中,是否可以按多个字段排序,例如
ellellDataSource.find( ... , 'order': 'ScheduleState, Rank', ... )
这样它将主要按 ScheduleState 排序,然后按 Rank 排序? (我尝试过,但无法让它工作 - 它似乎只使用第一个字段)。
另外,在按 ScheduleState 排序的查找查询示例中,结果看起来是根据状态的索引/进度排序的(即“已定义”,然后是“进行中”,依此类推,而不是按字母顺序)这个观察/假设正确吗?(我正在研究一个通过利用这个假设而变得更简单的显示器)
谢谢!
Two questions somewhat related to each other:
In a "find" / "findAll" query, is it possible to order by multiple fields, e.g.
rallyDataSource.find( ... , 'order': 'ScheduleState, Rank', ...)
such that it will order primarily by ScheduleState, but then by Rank? (I tried it, but couldn't get it to work - it seemed to only use the first field).
Also, with the example of doing a find query ordered by ScheduleState, it looks like the results are ordered according to the index / progress of the state (i.e. "Defined, then "In-Progress", and so on, and not alphabetically). Is this observation / assumption correct? (I'm working on a display that will be made simpler by utilizing this assumption)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够按多个字段排序...
是的 - 按下拉字段排序应按定义下拉项的顺序返回结果。
You should be able to sort by multiple fields...
And yes- ordering by a dropdown field should return the results in the order in which the dropdown items are defined.