[Package Index | Mudlib Index | Effect Index]

File /net/obj/couchdb.c

A CouchDB database interface for Discworld MUD.

Written by Taffyd

Started 21/11/2009

Inherits

This class inherits the following classes /std/object.c

Includes

This class includes the following files /include/move_failures.h

Method index

Public Functions

These are functions that everyone can access.

couchdb_get
void couchdb_get(string database,
                 string id,
                 function callback)

This method retrieves a document from the CouchDB server.

Parameters:
database - the name of the database
id - the unique identifier of the document
callback - a function pointer to be evaluated when the request completes.


couchdb_put
void couchdb_put(string database,
                 string id,
                 mapping data,
                 function callback)

This method uploads a document to the CouchDB server.

Parameters:
database - the name of the database
id - the unique identifier of the document
data - the CouchDB document package to be uploaded to the server. When updating an existing record, this must contain a revision item.
callback - a function pointer to be evaluated when the request completes.


set_server_uri
void set_server_uri(string uri)

This method sets the location of the CouchDB database.

Parameters:
uri - the location of the server.


test_put
void test_put(string id)