Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Added 2 methods: #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added 2 methods: #24

wants to merge 1 commit into from

Conversation

rayie
Copy link

@rayie rayie commented Nov 5, 2011

_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

_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":{"c":100}}' 'http://localhost:27080/foo/bar/_find_and_modify'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant