本文介绍了如何从 azure 表存储查询中获取 1000 多个实体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到 azure 表存储查询最多提供 1000 个实体,我们必须使用延续令牌来获取下一组实体.我只是在寻找一种简单的方法来做到这一点.我想要做的就是获取查询应该实际返回的所有实体,而不仅仅是 1000 个实体.我已经阅读了@smarx 帖子这里他在 TableStorageDataServiceQuery 中提到了 ExecuteAll 方法,但这似乎已被弃用,因为我在存储客户端库中找不到 TableStorageDataServiceQuery.

I have read that azure table storage queries give maximum of 1000 entities and we have to make use of continuation tokens to fetch the next set of entities. I am just looking for an easy way to do that. All I want to do is fetch all the entities that the query should actually return and not just the 1000 entities. I have read @smarx post here and he mentions about ExecuteAll method in TableStorageDataServiceQuery but this seems to have deprecated as I cant find TableStorageDataServiceQuery in the storage client library.

我还找到了有关如何处理的 msdn 文档获取所有实体的延续令牌.我只想知道这是否是获取所有实体的最佳方式,我不需要任何分页.或者有没有我可以使用的 ExecuteAll esque 方法?

I also found this msdn documentation on how to handle the continuation tokens to fetch all the entities. I just want to know if this is the best way to get all the entities, I dont need any pagination. Or is there any ExecuteAll esque method that I can use?

推荐答案

像这样使用 AsTableServiceQuery:

Using the AsTableServiceQuery like so:

var data = context.CreateQuery<SomeEntity>("table").AsTableServiceQuery<SomeEntity>().Execute();

这篇关于如何从 azure 表存储查询中获取 1000 多个实体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 05:51