Rethinkdb Python - 更改:如何 return 只有更改的字段?

Rethinkdb Python - Changes: How to return only the field that changed?

如何使用 rethink 中的 changefeed 仅接收更改的字段而不是所有可用字段?

如果这不可能,python找到修改字段的最佳方法是什么?

谢谢

如果您之前知道哪些字段将要更改,您可以指定您的选择,例如pluck/filter。否则你不能。将提供更改,包括整个文档:

{
   "old_val":"{}"
   "new_val":"{}"
}

关于如何比较更改源中的那些 json 文档的主题,您会找到很多解决方案,例如:

Comparing python dictionaries and find diffrence of the two