在Azure表存储中,是否可以使用.NET Core查询属性的子字符串?

时间:2019-04-07 10:59:14

标签: c# .net-core azure-storage

在我的Azure表中,有一个名为 "The screen size is:"+(float)Math.sqrt(height*height+width*width) +"\n" string属性,它看起来像这样(List的Json序列化):

"Labels"

是否可以在表中查询Labels属性中包含子字符串["value1","value2","value3","value4"] 的所有条目?

1 个答案:

答案 0 :(得分:0)

如果您要查找通配符搜索eg message like '%SysFn%'之类的内容,目前尚不可行,您可以在下面找到所有受支持的操作

https://docs.microsoft.com/en-us/rest/api/storageservices/Querying-Tables-and-Entities?redirectedfrom=MSDN

enter image description here 是的,您可以按任何属性进行过滤。但是请记住,只有PartitionKey和RowKey被索引,因此任何不至少包含PartitionKey的查询操作都将导致全表扫描。如果您的表包含很多实体,这将成为一个问题。

希望有帮助。