[clouchdb-devel] problem to retrieve document versions

Nicolas Lamirault nlamirault at gmail.com
Thu Jun 5 16:34:33 UTC 2008


hi,
i make some tests with clouchdb.

CL-USER> (clouchdb:get-document "G21903421662498" :revision-info t)
((:|_id| . "G21903421662498") (:|_rev| . "3836974416")
 (:TITLE . "Paste 2008-06-05 15:48:18") (:USERNAME . "lam")
 (:DATE . "2008-06-05 18:14:14") (:CODE . "  Test this paste")
 (:|_revs_info| ((:|rev| . "3836974416") (:|status| . "available"))
  ((:|rev| . "3249839272") (:|status| . "available"))))

i  would like  to  check  if more  than  one version  of  a document  is
available. But i can't really find how to do that in documentation.

CL-USER> (clouchdb:document-properties *)
((:CODE . "  Test this paste") (:DATE . "2008-06-05 18:14:14")
 (:USERNAME . "lam") (:TITLE . "Paste 2008-06-05 15:48:18"))

ex:

CL-USER> (clouchdb:get-document "G21903421662498" :revision-info t)
((:|_id| . "G21903421662498") (:|_rev| . "3836974416")
 (:TITLE . "Paste 2008-06-05 15:48:18") (:USERNAME . "lam")
 (:DATE . "2008-06-05 18:14:14") (:CODE . "  Test this paste")
 (:|_revs_info| ((:|rev| . "3836974416") (:|status| . "available"))
  ((:|rev| . "3249839272") (:|status| . "available"))))
CL-USER> (clouchdb:document-property :_revs_info *)
NIL

any idea ?
thanks for this CouchDB client !


-- 
Nicolas Lamirault



More information about the clouchdb-devel mailing list