cl-couchdb
Description
cl-couchdb is a frontend written in Common Lisp to the CouchDB database system.
It is developed on Debian GNU/Linux . and licensed under a license Lisp Lesser GNU Public License. It has been tested under SBCL.
Installation
cl-couchdb could be install like this :
- Load libraries :
CL-USER> (require 'asdf) CL-USER> (require 'asdf-install)
- Install cl-couchdb :
CL-USER> (asdf-install:install 'cl-couchdb)
- Launch the unit tests :
CL-USER> (asdf:oos 'asdf:load-op :cl-couchdb-test) CL-USER> (lisp-unit:run-all-tests :cl-couchdb-test)
Usage
- Creates a CouchDB client
CL-USER> (defparameter *couch* (cl-couchdb:make-couch "localhost" 8888)) *COUCH*
- Get CouchDB version
CL-USER> (cl-couchdb:version couch) "{"couchdb": "Welcome", "version": "0.6.4"}"
- List available databases
CL-USER> (cl-couchdb:list-db *couch*)) "[]"
- Creating a Database
CL-USER> (cl-couchdb:create-db *couch* "couchdb-test") "{"ok":true}" CL-USER> (cl-couchdb:list-db *couch*) "["couchdb-test"]"
- Deleting a Database
CL-USER> (cl-couchdb:create-db *couch* "couchdb-false") "{"ok":true}" CL-USER> (cl-couchdb:list-db *couch*) "["couchdb-test","couchdb-false"]" CL-USER> (cl-couchdb:delete-db *couch* "couchdb-false") "{"ok":true}" CL-USER> (cl-couchdb:list-db *couch*) "["couchdb-test"]"
- Creating a Document
CL-USER> (let ((content (json:encode-json-alist-to-string '(("author" "nicolas lamirault") ("version" "0.1") ("status" "alpha"))))) (cl-couchdb:save-document *couch* "couchdb-test" content)) "{"ok":true,"_id":"4C0073D929A15C54BFD0DD3D919994BE","_rev":1966123700}"
- List documents of a database
CL-USER> (cl-couchdb:list-documents *couch* "couchdb-test") "{"view":"_all_docs", "rows":[ {"_id":"4C0073D929A15C54BFD0DD3D919994BE","_rev":1966123700} ]}"
- Reading a document
CL-USER> (cl-couchdb:view-document *couch* "couchdb-test" "4C0073D929A15C54BFD0DD3D919994BE") "{"_id":"4C0073D929A15C54BFD0DD3D919994BE","_rev":1966123700,"author":["nicolas lamirault"],"version":["0.1"],"status":["alpha"]}"
- Deleting a document
CL-USER> (cl-couchdb:delete-document *couch* "couchdb-test" "4C0073D929A15C54BFD0DD3D919994BE") "{"ok":true,"_rev":-975457439}" CL-USER> (cl-couchdb:list-documents *couch* "couchdb-test") "{"ok":true,"_rev":-975457439}"
News
Initial version. Implements Database, Document and View protocol.
Team
List of developers :
Nicolas Lamirault - nicolas.lamirault@gmail.com
Mailing Lists
Mailing lists that have been established for this project :
Repository
NIL NIL
Releases
0.1 cl-couchdb-0.1
API
API Reference documentation for
cl-couchdb project.
XREF
Source Reference for cl-couchdb project.
Lisp Critic
Check aspects of cl-couchdb project's source code.