是否可以合理地假设 continuation partionkey 和 rowkey 的存在表明有更多记录可用,而没有 continuation 表明没有更多记录?
我问的原因是因为以下查询根本不返回任何记录(由于过滤条件),但仍返回继续。我很困惑,我应该如何知道查询表存储时是否有更多记录?
var query = (from s in myStorageServiceContext.CreateQuery<Customer>("Customers")
where false
select s).Take(1000) as DataServiceQuery<Customer>;
var response = (QueryOperationResponse)query.Execute();
string nextRowKey = null;
string nextPartitionKey = null;
response.Headers.TryGetValue("x-ms-continuation-NextPartitionKey", out nextPartitionKey);
response.Headers.TryGetValue("x-ms-continuation-NextRowKey", out nextRowKey);
if (!string.IsNullOrEmpty(nextPartitionKey)) throw new Exception("NextPartitionKey is not null");
if (!string.IsNullOrEmpty(nextRowKey)) throw new Exception("NextRowKey is not null");