开发者

How to delete document from CouchDB using CouchPotato?

开发者 https://www.devze.com 2023-01-15 15:07 出处:网络
I have problems finding documentation on how to delete a document from CouchDB using CouchPotato. As fare as I know I have t开发者_运维百科o set the property _deleted = true. When I want to get docume

I have problems finding documentation on how to delete a document from CouchDB using CouchPotato. As fare as I know I have t开发者_运维百科o 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?


CouchPotato.database.destroy <my_model_instance>

0

精彩评论

暂无评论...
验证码 换一张
取 消