如何使用 CouchPotato 从 CouchDB 中删除文档?
我在查找有关如何使用 CouchPotato 从 CouchDB 删除文档的文档时遇到问题。据我所知,我必须设置属性_deleted = true
。当我想要获取未删除的文档时,我尝试向我的类添加一个条件,如下所示:
view :item, :key => [:userid, :date], :conditions => 'doc._deleted === nil'
但它不起作用。有人能指出我正确的方向吗?
I have problems finding documentation on how to delete a document from CouchDB using CouchPotato. As fare as I know I have to set the property _deleted = true
. When I want to get documents that is not deleted, I have tried to add a condition to my class like this:
view :item, :key => [:userid, :date], :conditions => 'doc._deleted === nil'
But it doesn't work. Can someone point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CouchPotato.database.destroy
CouchPotato.database.destroy <my_model_instance>