【发布时间】:2021-02-18 15:41:14
【问题描述】:
我正在尝试查找带有空字符串的字段。它们看起来像这样:
Python 代码:
from loguru import logger
from google.cloud import firestore
firestore_client = firestore.Client.from_service_account_json('creds.json')
ref = firestore_client.collection('database')
users_ref = ref.collection(u'users').where(u'placeName', u'==', u'')
docs = [snapshot for snapshot in users_ref.stream()]
我的代码不起作用。我怎样才能得到这样的字段?
【问题讨论】:
-
您能提供更多信息吗? users_ref.stream() 是什么类型?它是字典列表吗?
-
请说明您所说的“不工作”是什么意思。请参阅question checklist,并提供minimal reproducible example。
标签: python google-cloud-firestore