Skip to content

Instantly share code, notes, and snippets.

@peysal
Last active August 29, 2015 14:15
Show Gist options
  • Save peysal/80812dc0210d23b1811a to your computer and use it in GitHub Desktop.
Save peysal/80812dc0210d23b1811a to your computer and use it in GitHub Desktop.
Couchdb exploration
Map objective: build up key
Key query: use browser to query.
example http://127.0.0.1:5984/cms21_sample_file/_design/sample_file/_view/account?key=[%22C002%22,%222001%22]
This example query multiple key value
Tips 1: key shuoldnt contain any empty space infront or at back. Use trim. Ease the process building the URL request
Using Curl: http://stackoverflow.com/questions/8333920/passing-a-url-with-brackets-to-curl
example curl -X GET http://127.0.0.1:5984/cms21_sample_file/_design/sample_file/_view/account?key=[%22C002%22,%222001%22] -g
observe character [] caused issue when not use with -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment