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.

Using plain Rebol3

This is how you can use CouchDB from plain Rebol3 (which is currently in public Alpha).

And here you can get Rebol3 Rebol3 Alpha download

How to read data from CouchDB using Rebol

to-string read http://localhost:5984/db2/id

How to write data to CouchDB using Rebol

to-string write http://localhost:5984/db2/id json-data

How to create a new CouchDB Database using Rebol

to-string write http://localhost:5984/db2 [PUT [] ""]

A complete console session

>> to-string write http://localhost:5984/hohtest [PUT]
== {{"ok":true}}

>> to-string write http://localhost:5984/hohtest {{"_id":"hello","data":"Hello World!"}}
== {{"ok":true,"id":"hello","rev":"1-a67aaac28adabcdd8d0718187741d49d"}}

>> to-string read http://localhost:5984/hohtest/hello
== {{"_id":"hello","_rev":"1-a67aaac28adabcdd8d0718187741d49d","data":"Hello World!"}}

>> to-string write http://localhost:5984/hohtest [DELETE]
== {{"ok":true}}

BTW, to-string is only needed to make it human readable. Without it, the return values would be binary.

A Rebol3 module

And here you can get a Rebol3 module, to make it even easier. especially working with json data.

couchdb3.r on rebol.org

Getting_started_with_Rebol (last edited 2011-11-23 14:53:59 by JanLehnardt)