Module couchdb


Function Index

database_name_is_valid/1Checks if the name of the database is valid as per CouchDB API Docs 1.3.1/PUT.
database_record/2Create a database record, it is used to connect to CouchDB; Database and Document releated functions take this record as an argument.
database_record/3Create a database record, it is used to connect to CouchDB; Database and Document releated functions take this record as an argument.
generate_unique_id/0Returns the Id of a Document.
get_document_id/1Returns the Id of a Document.
get_document_rev/1Returns the Rev of a Document.
server_record/1Create a server record, it is used to connect to CouchDB; Server releated functions take this record as an argument.
server_record/2Create a server record, it is used to connect to CouchDB; Server releated functions take this record as an argument.

Function Details

database_name_is_valid/1

database_name_is_valid(X1::binary()) -> boolean()

Checks if the name of the database is valid as per CouchDB API Docs 1.3.1/PUT

database_record/2

database_record(Server, X2) -> any()

Equivalent to database_record / 3.

Create a database record, it is used to connect to CouchDB; Database and Document releated functions take this record as an argument.

database_record/3

database_record(Server::server(), DbName::binary(), OptionsList::list()) -> {ok, db()} | {error, term()}

Create a database record, it is used to connect to CouchDB; Database and Document releated functions take this record as an argument.

generate_unique_id/0

generate_unique_id() -> binary()

Returns the Id of a Document

get_document_id/1

get_document_id(Document::map()) -> binary() | atom()

Returns the Id of a Document

get_document_rev/1

get_document_rev(Document::map()) -> binary() | atom()

Returns the Rev of a Document

server_record/1

server_record(Url::binary()) -> Server::server()

Equivalent to server_record / 3.

Create a server record, it is used to connect to CouchDB; Server releated functions take this record as an argument. This record is required to make a database record.

server_record/2

server_record(Url::binary(), OptionsList::list()) -> Server::server()

Create a server record, it is used to connect to CouchDB; Server releated functions take this record as an argument. This record is required to make a database record.

Options() = [option()] option() = {is_ssl, boolean()} | {ssl_options, [SSLOpt]} | {pool_name, atom()} | {proxy_host, string()} | {proxy_port, integer()} | {proxy_user, string()} | {proxy_password, string()} | {basic_auth, {username(), password()}} | {cookie, string()} | {oauth, oauthOptions()} | {proxyauth, [proxyauthOpt]}

username() = string() password() = string() SSLOpt = term() oauthOptions() = [oauth()] oauth() = {consumer_key, string()} | {token, string()} | {token_secret, string()} | {consumer_secret, string()} | {signature_method, string()}

proxyOpt = {X-Auth-CouchDB-UserName, username :: string()} | {X-Auth-CouchDB-Roles, roles :: string} | list_of_user_roles_separated_by_a_comma {X-Auth-CouchDB-Token: token :: string()} | authentication token. Optional, but strongly recommended to force token be required to prevent requests from untrusted sources.


erlang logo

Made with EDoc-S