sleepy.mongoose icon indicating copy to clipboard operation
sleepy.mongoose copied to clipboard

Added 2 methods:

Open rayie opened this issue 13 years ago • 0 comments

_count _find_and_modify

count is called the same way as find, returns {count: ..,ok:1} find_and_modify requires POST, and accepts parameters as mongodb findAndModify (1.3+), with defaults example:

curl --data 'new=1&query={"honey":"yes"}&upsert=1&newobj={"$set":{"ounces":100}}' 'http://localhost:27080/foo/bar/_find_and_modify'

returns matched document or new document if new=1

rayie avatar Nov 05 '11 07:11 rayie