0
我想知道是否有更簡單的方法來檢查數據是否在表中。目前,我不得不使用RethinkDB - Python - 檢查表中是否存在數據
users = r.db("main").table("users").filter(r.row['user'] == int(msg.author.id)).run()
for user in blacklist:
if users['user'] == msg.author.id:
return # this happens if the user sending a message was found
我有使用這種由於用戶是一個重新思考數據光標
<rethinkdb.net.DefaultCursor object at 0x0512C0B0> (done streaming):
的響應,所以它不是像我可以用
data has item
謝謝
[rethinkdb檢查是否存在記錄] (https://stackoverflow.com/questions/43782915/rethinkdb-check-if-record-exists)有關嗎?.. – alecxe
兩件事。首先是javascript,其次是基於id的文檔不基於表數據。 – Doh