|
APIDocumentation
eCouch API documentation
Module ecoucheCouch is an Erlang application that provides access to CouchDb servers. Copyright © 2008 Vitor Rodrigues Version: 0.1 Behaviours: application. Authors: Vitor Rodrigues (vitor tarpipe (dot) com). Characteristics
Data Typesarray() = val() host() = string() json() = obj() | array() | num() | str() | true | false | null key() = str() | atom() num() = int() | float() obj() = {obj, [{key(), val()}]} startargs() = {host(), tcp_port()} str() = bin() tcp_port() = int() val() = obj() | array() | num() | str() | true | false | null Function Detailsdb_create/1db_create(DatabaseName::string()) -> ok | {error, Reason::term()} Create a database db_delete/1db_delete(DatabaseName::string()) -> ok | {error, Reason::term()} Delete a database db_info/1db_info(DatabaseName::string()) -> {ok, Info::json()} | {error, Reason::term()} Database info db_list/0db_list() -> ok | {error, Reason::term()} List databases doc_create/2doc_create(DatabaseName::string(), Doc::json()) -> {ok, Response::json()} | {error, Reason::term()} Create document doc_create/3doc_create(DatabaseName::string(), DocName::string(), Doc::json()) -> {ok, Response::json()} | {error, Reason::term()} Create a named document doc_delete/3doc_delete(DatabaseName::string(), DocName::string(), Rev::string()) -> {ok, Response::json()} | {error, Reason::term()} Delete document doc_get/2doc_get(DatabaseName::string(), DocName::string) -> {ok, Response::json()} | {error, Reason::term()} Get document doc_get/3doc_get(DatabaseName::string(), DocName::string(), Options::options()) -> {ok, Response::json()} | {error, Reason::term()} Get document doc_get_all/1doc_get_all(DatabaseName::string()) -> {ok, Response::json()} | {error, Reason::term()} Get all documents doc_get_all/2doc_get_all(DatabaseName::string(), Options::options()) -> {ok, Response::json()} | {error, Reason::term()} Get all documents doc_update/3doc_update(DatabaseName::string(), DocName::string(), Doc::json()) -> {ok, Response::json()} | {error, Reason::term()} Update document start/2start(Type::Type, StartArgs::startargs()) -> {ok, Pid} | {ok, Pid, State} | {error, Reason} This function is called whenever an application is started using application:start/1,2, and should start the processes of the application. If the application is structured according to the OTP design principles as a supervision tree, this means starting the top supervisor of the tree. stop/1stop(State) -> void() This function is called whenever an application has stopped. It is intended to be the opposite of Module:start/2 and should do any necessary cleaning up. The return value is ignored. view_adhoc/2view_adhoc(DatabaseName::string(), Fun::json()) -> {ok, Response::json()} | {error, Reason::term()} Access an adhoc view view_adhoc/3view_adhoc(DatabaseName::string(), Fun::json(), Options::options()) -> {ok, Response::json} | {error, Reason::term()} Access an adhoc view |
Sign in to add a comment