google-cloud-python是否可以查询实体的列表属性?

问题描述 投票:0回答:1

我正在查看文档(https://googleapis.dev/python/datastore/latest/queries.html),但我不清楚是否可以运行查询以返回实体的所有成员的查询,而这些实体的ListProperty中存在值。

[示例:如果我有一个名为Books的实体,并且该实体的字段为tags,它是一个字符串列表,是否可以在Books ListProperty中查询带有"fiction"的所有Books.tags

python google-cloud-datastore
1个回答
0
投票

对于python,您可以这样做:

query = client.query(kind='KindName')
query.add_filter('tags', '=', 'fiction')

您可以获得here的更多信息和见解。

© www.soinside.com 2019 - 2024. All rights reserved.