all_dbs/1 | get list of databases on a CouchDB node. |
all_docs/1 | (Deprecated.) get all documents from a CouchDB database. |
all_docs/2 | (Deprecated.) get all documents from a CouchDB database. |
compact/1 | Compaction compresses the database file by removing unused sections created during updates. |
compact/2 | Like compact/1 but this compacts the view index from the current version of the design document. |
create_db/2 | Create a database and a client for connectiong to it. |
create_db/3 | Create a database and a client for connectiong to it. |
create_db/4 | Create a database and a client for connectiong to it. |
db_exists/2 | test if db with dbname exists on the CouchDB node. |
db_info/1 | get database info. |
db_request/4 | |
db_request/5 | |
db_request/6 | |
db_url/1 | |
delete_attachment/3 | delete a document attachment. |
delete_attachment/4 | delete a document attachment. |
delete_db/1 | delete database. |
delete_db/2 | delete database. |
delete_doc/2 | delete a document. |
delete_doc/3 | delete a document if you want to make sure the doc it emptied on delete, use the option {empty_on_delete, true} or pass a doc with just _id and _rev members. |
delete_docs/2 | delete a list of documents. |
delete_docs/3 | delete a list of documents if you want to make sure the doc it emptied on delete, use the option {empty_on_delete, true} or pass a doc with just _id and _rev members. |
doc_exists/2 | test if doc with uuid exists in the given db. |
doc_url/2 | |
ensure_full_commit/1 | commit all docs in memory. |
ensure_full_commit/2 | commit all docs in memory. |
fetch_attachment/3 | fetch a document attachment. |
fetch_attachment/4 | fetch a document attachment. |
fetch_attachment/5 | fetch a document attachment. |
get_uuid/1 | Get one uuid from the server. |
get_uuids/2 | Get a list of uuids from the server. |
lookup_doc_rev/2 | |
lookup_doc_rev/3 | |
make_url/3 | |
open_db/2 | Create a client for connection to a database. |
open_db/3 | Create a client for connection to a database. |
open_doc/2 | open a document. |
open_doc/3 | open a document Params is a list of query argument. |
open_or_create_db/2 | Create a client for connecting to a database and create the database if needed. |
open_or_create_db/3 | Create a client for connecting to a database and create the database if needed. |
open_or_create_db/4 | Create a client for connecting to a database and create the database if needed. |
put_attachment/4 | put an attachment. |
put_attachment/5 | put an attachment. |
replicate/2 | Handle replication. |
replicate/3 | Handle replication. |
replicate/4 | handle Replication. |
save_doc/2 | save a document. |
save_doc/3 | save a document A document is a Json object like this one:. |
save_docs/2 | save a list of documents. |
save_docs/3 | save a list of documents. |
server_connection/0 | Create a server for connectiong to a CouchDB node. |
server_connection/2 | Create a server for connectiong to a CouchDB node. |
server_connection/4 | Create a server for connectiong to a CouchDB node. |
server_info/1 | Get Information from the server. |
server_url/1 | Asemble the server URL for the given client. |
start/0 | Start the couchbeam process. |
stop/0 | Stop the couchbeam process. |
stream_fetch_attachment/4 | stream fetch attachment to a Pid. |
stream_fetch_attachment/5 | stream fetch attachment to a Pid. |
stream_fetch_attachment/6 | stream fetch attachment to a Pid. |
uuids_url/1 | |
version/0 | Return the version of the application. |
view/2 | (Deprecated.) get view results from database. |
view/3 | (Deprecated.) get view results from database. |
all_dbs(Server::server()) -> {ok, iolist()}
get list of databases on a CouchDB node
all_docs(Db) -> any()
Equivalent to all_docs(Db, []).
This function is deprecated: use new api in couch_view
.
get all documents from a CouchDB database.
This function is deprecated: use new api in couch_view
.
get all documents from a CouchDB database. It return a #view{} record that you can use with couchbeam_oldview functions:
compact(Db::db()) -> ok | {error, term()}
Compaction compresses the database file by removing unused sections created during updates. See http://wiki.apache.org/couchdb/Compaction for more informations
compact(Db::db(), ViewName::string()) -> ok | {error, term()}
Like compact/1 but this compacts the view index from the current version of the design document. See http://wiki.apache.org/couchdb/Compaction#View_compaction for more informations
create_db(Server, DbName) -> any()
Equivalent to create_db(Server, DbName, [], []).
Create a database and a client for connectiong to it.
create_db(Server, DbName, Options) -> any()
Equivalent to create_db(Server, DbName, Options, []).
Create a database and a client for connectiong to it.
create_db(Server::server(), DbName::string(), Options::optionList(), Params::list()) -> {ok, db() | {error, Error}}
Create a database and a client for connectiong to it.
Connections are made to:http://Host:PortPrefix/DbNameIf ssl is set https is used. See server_connections for options. Params is a list of optionnal query argument you want to pass to the db. Useful for bigcouch for example.
db_exists(Server::server(), DbName::string()) -> boolean()
test if db with dbname exists on the CouchDB node
db_info(Db::db()) -> {ok, iolist() | {error, Error}}
get database info
db_request(Method, Url, Expect, Options) -> any()
db_request(Method, Url, Expect, Options, Headers) -> any()
db_request(Method, Url, Expect, Options, Headers, Body) -> any()
db_url(Db) -> any()
delete_attachment(Db, Doc, Name) -> any()
Equivalent to delete_attachment(Db, Doc, Name, []).
delete a document attachment
delete_attachment(Db, DocOrDocId, Name, Options) -> any()
delete a document attachment
delete_db(Db) -> any()
Equivalent to delete_db(Server, DbName).
delete database
delete_db(Server::server(), DbName) -> {ok, iolist() | {error, Error}}
delete database
delete_doc(Db, Doc) -> any()
Equivalent to delete_doc(Db, Doc, []).
delete a document
delete_doc(Db, Doc, Options) -> {ok, Result} | {error, Error}
delete a document if you want to make sure the doc it emptied on delete, use the option {empty_on_delete, true} or pass a doc with just _id and _rev members.
delete_docs(Db, Docs) -> any()
Equivalent to delete_docs(Db, Docs, []).
delete a list of documents
delete_docs(Db::db(), Docs::list(), Options::list()) -> {ok, Result} | {error, Error}
delete a list of documents if you want to make sure the doc it emptied on delete, use the option {empty_on_delete, true} or pass a doc with just _id and _rev members.
doc_exists(Db::db(), DocId::string()) -> boolean()
test if doc with uuid exists in the given db
doc_url(Db, DocId) -> any()
ensure_full_commit(Db) -> any()
Equivalent to ensure_full_commit(Db, []).
commit all docs in memory
ensure_full_commit(Db::db(), Options::list()) -> {ok, term()} | {error, term()}
commit all docs in memory
fetch_attachment(Db, DocId, Name) -> any()
Equivalent to fetch_attachment(Db, DocId, Name, [], DEFAULT_TIMEOUT).
fetch a document attachment
fetch_attachment(Db, DocId, Name, Options) -> any()
Equivalent to fetch_attachment(Db, DocId, Name, Options, DEFAULT_TIMEOUT).
fetch a document attachment
fetch_attachment(Db::db(), DocId::string(), Name::string(), Options::list(), Timeout::infinity | integer()) -> {ok, binary()}
fetch a document attachment
Get one uuid from the server
Get a list of uuids from the server
lookup_doc_rev(Db, DocId) -> any()
lookup_doc_rev(Db, DocId, Params) -> any()
make_url(Server, Path, Query) -> any()
open_db(Server, DbName) -> any()
Equivalent to open_db(Server, DbName, []).
Create a client for connection to a database
open_db(Server::server(), DbName::string(), Options::optionList()) -> {ok, db()}
Create a client for connection to a database
open_doc(Db, DocId) -> any()
Equivalent to open_doc(Db, DocId, []).
open a document
open_doc(Db::db(), DocId::string(), Params::list()) -> {ok, Doc} | {error, Error}
open a document Params is a list of query argument. Have a look in CouchDb API
open_or_create_db(Server, DbName) -> any()
Equivalent to open_or_create_db(Server, DbName, [], []).
Create a client for connecting to a database and create the database if needed.
open_or_create_db(Server, DbName, Options) -> any()
Equivalent to open_or_create_db(Server, DbName, Options, []).
Create a client for connecting to a database and create the database if needed.
open_or_create_db(Server::server(), DbName::string(), Options::list(), Params::list()) -> {ok, db() | {error, Error}}
Create a client for connecting to a database and create the database if needed.
put_attachment(Db, DocId, Name, Body) -> any()
Equivalent to put_attachment(Db, DocId, Name, Body, []).
put an attachment
put_attachment(Db::db(), DocId::string(), Name::string(), Body::body(), Option::optionList()) -> {ok, iolist()}
put an attachment
replicate(Server::server(), RepObj::{list()}) -> {ok, Result} | {error, Error}
Handle replication. Pass an object containting all informations It allows to pass for example an authentication info
RepObj = {[ {<<"source">>, <<"sourcedb">>}, {<<"target">>, <<"targetdb">>}, {<<"create_target">>, true} ]} replicate(Server, RepObj).
Handle replication.
replicate(Server, Source, Target, X4) -> any()
handle Replication. Allows to pass options with source and target. Options is a Json object. ex:
Options = {[{<<"create_target">>, true}]}, couchbeam:replicate(S, "testdb", "testdb2", Options).
save_doc(Db, Doc) -> any()
Equivalent to save_doc(Db, Doc, []).
save a document
save_doc(Db::db(), Doc, Options::list()) -> {ok, Doc1} | {error, Error}
save a document A document is a Json object like this one:
{[ {<<"_id">>, <<"myid">>}, {<<"title">>, <<"test">>} ]}Options are arguments passed to the request. This function return a new document with last revision and a docid. If _id isn't specified in document it will be created. Id is created by extracting an uuid from the couchdb node.
save_docs(Db, Docs) -> any()
Equivalent to save_docs(Db, Docs, []).
save a list of documents
save_docs(Db::db(), Docs::list(), Options::list()) -> {ok, Result} | {error, Error}
save a list of documents
server_connection() -> any()
Equivalent to server_connection("127.0.0.1", 5984, "", [], false).
Create a server for connectiong to a CouchDB node
server_connection(Host, Port) -> any()
Equivalent to server_connection(Host, Port, "", []).
Create a server for connectiong to a CouchDB node
server_connection(Host::string(), Port::integer(), Prefix::string(), Options::optionList()) -> Server::server()
Create a server for connectiong to a CouchDB node
Connections are made to:http://Host:PortPrefix
If ssl is set https is used.
For a description of SSL Options, look in the ssl manpage.server_info(Server::server()) -> {ok, iolist()}
Get Information from the server
server_url(Server::{Host, Port}) -> iolist()
Asemble the server URL for the given client
start() -> any()
Start the couchbeam process. Useful when testing using the shell.
stop() -> any()
Stop the couchbeam process. Useful when testing using the shell.
stream_fetch_attachment(Db, DocId, Name, ClientPid) -> any()
Equivalent to stream_fetch_attachment(Db, DocId, Name, ClientPid, [], DEFAULT_TIMEOUT).
stream fetch attachment to a Pid.
stream_fetch_attachment(Db, DocId, Name, ClientPid, Options) -> any()
Equivalent to stream_fetch_attachment(Db, DocId, Name, ClientPid, Options, DEFAULT_TIMEOUT).
stream fetch attachment to a Pid.
stream_fetch_attachment(Db::db(), DocId::string(), Name::string(), ClientPid::pid(), Options::list(), Timeout::integer()) -> {ok, reference()} | {error, term()}
stream fetch attachment to a Pid. Messages sent to the Pid
will be of the form {reference(), message()}
,
where message()
is one of:
uuids_url(Server) -> any()
version() -> Version
Return the version of the application.
view(Db, ViewName) -> any()
Equivalent to view(Db, ViewName, []).
This function is deprecated: use new api in couch_view
.
get view results from database
This function is deprecated: use new api in couch_view
.
get view results from database. viewname is generally a tupple like {DesignName::string(), ViewName::string()} or string like "designname/viewname". It return a #view{} record that you can use with couchbeam_oldview functions:
Options are CouchDB view parameters
See http://wiki.apache.org/couchdb/HTTP_view_API for more informations.Generated by EDoc, Aug 31 2012, 10:02:31.