Skip to content

Commit

Permalink
renamed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatthieu committed Jun 2, 2012
1 parent c679b27 commit 511ddc2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions readme.md
@@ -1,24 +1,24 @@
# CouchDB Tips

++ CREATE DATABASE
## CREATE DATABASE
curl -X PUT http://127.0.0.1:5984/books

++ WRITE RECORD
## WRITE RECORD
curl -X PUT http://127.0.0.1:5984/books/1 -d \
"{
\"_id\":\"1\",
\"title\":\"couchdb the definitive guide\"
}"


++ READ RECORD
## READ RECORD
curl -X GET http://127.0.0.1:5984/books/1


++ DELETE RECORD
curl -X DELETE http://127.0.0.1:5984/books/1?rev+1-6e488095a5bf295b5880ce74846ca7bf
## DELETE RECORD
curl -X DELETE http://127.0.0.1:5984/books/1?rev#1-6e488095a5bf295b5880ce74846ca7bf

++ UPDATE RECORD
## UPDATE RECORD
curl -X PUT http://127.0.0.1:5984/books/1 -d \
"{
\"_id\":\"1\",
Expand All @@ -27,7 +27,7 @@ curl -X PUT http://127.0.0.1:5984/books/1 -d \
}"


++ MAP:
## MAP:
function(doc) {
if (doc.title){
emit(doc.title);
Expand All @@ -36,9 +36,9 @@ function(doc) {

Save as defaults / titles

++ GET VIEW
## GET VIEW
curl -X GET http://127.0.0.1:5984/books/_design/default/_view/titles


++ GET VIEW with Doc
curl -X GET http://127.0.0.1:5984/books/_design/default/_view/titles -G -d include_docs+true
## GET VIEW with Doc
curl -X GET http://127.0.0.1:5984/books/_design/default/_view/titles -G -d include_docs#true

0 comments on commit 511ddc2

Please sign in to comment.