[clouchdb-cvs] CVS clouchdb/public_html

peddy peddy at common-lisp.net
Sun Jun 29 17:30:59 UTC 2008


Update of /project/clouchdb/cvsroot/clouchdb/public_html
In directory clnet:/tmp/cvs-serv32190

Modified Files:
	index.html 
Log Message:
Added (setf (set-document-property) ..) doc


--- /project/clouchdb/cvsroot/clouchdb/public_html/index.html	2008/06/29 17:13:38	1.1
+++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html	2008/06/29 17:30:59	1.2
@@ -413,7 +413,7 @@
 
 ;; Get all documents in current database
 CLOUCHDB-USER> <b>(get-all-documents)</b>
-((:TOTAL_ROWS . 3) (:OFFSET . 0) 
+((:|total_rows| . 3) (:|offset| . 0) 
  (:|rows|
   ((:|id| . "C731D3A3698DA144FB35EDA9737917F2") (:KEY . "C731D3A3698DA144FB35EDA9737917F2") 
    (:|value| (:|rev| . "3363852140")))
@@ -996,6 +996,21 @@
 
 (document-property :name (get-document "max"))
 <b>=></b> "Maxwell Smart"
+
+;; document-property is setf-able, but note that the result is
+;; not persisted automatically (use put-document for that)
+
+(setf (document-property :name (get-document "max")) "Max")
+<b>=></b>((:|_id| . "max") (:|_rev| . "1213746364") (:NAME . "Max") (:AGENT . 86))
+
+(document-property :name (get-document "max"))
+<b>=></b> "Maxwell Smart"
+
+(put-document (setf (document-property :name (get-document "max")) "Max"))
+<b>=></b>((:|ok| . T) (:|id| . "max") (:|rev| . "1262996208"))
+
+(get-document "max")
+<b>=></b>((:|_id| . "max") (:|_rev| . "1262996208") (:NAME . "Max") (:AGENT . 86))
 </pre>
 <p>
 See




More information about the clouchdb-cvs mailing list