From peddy at common-lisp.net Sat Mar 1 19:19:17 2008 From: peddy at common-lisp.net (peddy) Date: Sat, 1 Mar 2008 14:19:17 -0500 (EST) Subject: [clouchdb-cvs] CVS clouchdb/public_html Message-ID: <20080301191917.8933F3203A@common-lisp.net> Update of /project/clouchdb/cvsroot/clouchdb/public_html In directory clnet:/tmp/cvs-serv28981/public_html Modified Files: index.html style.css Log Message: - Updated docs with complex view key info - Updated examples with complex view examples --- /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2008/02/18 03:16:01 1.16 +++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2008/03/01 19:19:16 1.17 @@ -219,8 +219,8 @@

NB: If you try these examples I suggest also viewing the results via CouchDb's bulit-in HTML UI - at http://localhost:8888/_utils/browse/index.html, - (or http://localhost:5984/_utils/browse/index.html + at http://localhost:5894/_utils/browse/index.html, + (or http://localhost:8888/_utils/browse/index.html if you're using ClouchDb versions prior to 7.2), of course you'll need to adjust the URL for the actual CouchDb server and port in use. @@ -302,11 +302,11 @@ ;; Get revision information for this document (formatted for legibility) CLOUCHDB-USER> (get-document "someid" :revision-info t) ((:|_id| . "someid") (:|_rev| . "4275808446") (:SIZE . "large") (:COLOR . "green") - (:|_rev|S_INFO - ((:|rev| . "4275808446") (:STATUS . "disk")) - ((:|rev| . "3181950830") (:STATUS . "disk")))) -;; Since the first revision is still available (:status . "disk") we -;; can still retrieve it + (:|_revs_info| + ((:|rev| . "4275808446") (:|status| . "disk")) + ((:|rev| . "3181950830") (:|status| . "disk")))) +;; Since the first revision is still available (i.e., :|status| == "disk") +;; we can still retrieve it: CLOUCHDB-USER> (get-document "someid" :revision "3181950830") ((:|_id| . "someid") (:|_rev| . "3181950830") (:SIZE . "large") (:COLOR . "blue")) @@ -317,11 +317,11 @@ (:tags . ("country" "European")) ;; Field using map property value: (:demographics . ((:population . 10230000) - ;; A nested map property: - (:religion . ((:agnostic . 0.59) - (:roman-catholic . 0.26) - (:protestant . 2.5))) - (:political-system . "democracy")))) + ;; A nested map property: + (:religion . ((:agnostic . 0.59) + (:roman-catholic . 0.26) + (:protestant . 2.5))) + (:political-system . "democracy")))) :id "czechrepublic") ((:|ok| . T) (:|id| . "czechrepublic") (:|rev| . "4272625130")) ;; Let's see what this document looks like (formatted for legibility) @@ -336,12 +336,12 @@ ((:TOTAL_ROWS . 3) (:OFFSET . 0) (:ROWS ((:|id| . "C731D3A3698DA144FB35EDA9737917F2") (:KEY . "C731D3A3698DA144FB35EDA9737917F2") - (:VALUE (:|rev| . "3363852140"))) - ((:|id| . "czechrepublic") (:KEY . "czechrepublic") (:VALUE (:|rev| . "4272625130"))) - ((:|id| . "someid") (:KEY . "someid") (:VALUE (:|rev| . "4275808446"))))) + (:|value| (:|rev| . "3363852140"))) + ((:|id| . "czechrepublic") (:KEY . "czechrepublic") (:|value| (:|rev| . "4272625130"))) + ((:|id| . "someid") (:KEY . "someid") (:|value| (:|rev| . "4275808446"))))) -

Example 3

+

Example 3

Demonstrating: