限制 TFS WorkItemStore.Query 的结果
有没有办法限制从 WorkItemStore.Query 返回的工作项数量?
workItemStore.Query("Select Title from Issue where (State = 'Active') order by Title") <-- 返回相当多的结果。对于我正在做的事情,我只想要前 5 个结果。
使用类似的查询 “从问题中选择前 5 个 ID、标题,其中 (State = 'Active') 按标题排序” 结果是“预期字符串结束。错误是由 «5» 引起的。 “ 错误。
Is there a way to limit the amount of workitems that gets returned from WorkItemStore.Query?
workItemStore.Query("Select Title from Issue where (State = 'Active') order by Title") <-- returns quite a few results. For what I'm doing I only want the first 5 results.
Using a query like
"Select TOP 5 ID, Title from Issue where (State = 'Active') order by Title"
results in a "Expecting end of string. The error is caused by «5».
" error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为在这种情况下,您可能无法使用 WIQL。我想到了一些事情 - 您可以对 TFSWorkItemTracking 数据库进行数据库查询,或者您可以使用另一个限制因素(上次更新日期、创建日期等)。
I think you may be out of luck with WIQL in this case. A couple things come to mind-- you could do a database query against the TFSWorkItemTracking database, or you could use another limiting factor (last updated date, create date, etc.).