sleepy.mongoose
sleepy.mongoose copied to clipboard
Added 2 methods:
_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