We have a new wiki. The migration is not 100% complete. You can help out by moving pages across. This wiki will exist for as long as there are pages left.

The official documentation has moved to http://docs.couchdb.org — The transition is not 100% complete, but http://docs.couchdb.org should be seen as having the latest info. In some cases, the wiki still has some more or older info on certain topics inside CouchDB.

You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name.

Getting started with Common Lisp and the CouchDB API.


The code for Clouchdb, the Common Lisp CouchDB library, as well as full documentation and more detailed examples can be obtained from:

This library can also be installed with ASDF:

CL-USER> (asdf-install:install 'clouchdb)
CL-USER> (asdf:oos 'asdf:load-op '#clouchdb)

Using the Library

;; Create a workspace package
(defpackage :clouchdb-user (:use :cl :clouchdb))
(in-package :clouchdb-user)

;; See what databases exist on default connection, which is 
;; host "localhost", port 5984

;; Create database "myDb"
(set-connection :db-name "myDb")

;; Create a document in database "myDb"
(create-document '((:Subject . "I like Plankton")
                   (:Author . "Rusty")
                   (:PostedDate . "2006-08-15T17:30:12-04:00")"
                   (:Tags . ("plankton" "baseball" "decisions"))
                  :id "myDoc")

;; Get all documents in "myDb"

;; Get document "myDoc"
(get-document "myDoc")

;; Delete document "myDoc"
(delete-document :id "myDoc")

;; List information about database "myDb"
(get-db-info :db-name "myDb")

ClouchDB (last edited 2011-11-23 14:45:45 by 62)