Module cloudi_service_db_couchdb

CloudI CouchDB Data Module

.

Copyright © 2009-2015 Michael Truog

Version: 1.5.0 Apr 12 2015 21:11:37 ------------------------------------------------------------------------

Behaviours: cloudi_service.

Authors: Michael Truog (mjtruog [at] gmail (dot) com).

Description

CloudI CouchDB Data Module

Data Types

agent()

agent() = cloudi:agent()

external_response()

external_response(Result) = {{ok, Result}, NewAgent::agent()} | {{error, cloudi:error_reason_sync()}, NewAgent::agent()}

service_name()

service_name() = cloudi:service_name()

timeout_milliseconds()

timeout_milliseconds() = cloudi:timeout_milliseconds()

Function Index

cloudi_service_handle_info/3
cloudi_service_handle_request/11
cloudi_service_init/4
cloudi_service_terminate/3
create_attachment/5

Create a document attachment from a file.

The file is referenced by its filename.
create_attachment/6
create_database/2

Create the database.

.
create_database/3
create_document/3

Create a document and allow the server to create the document id.

.
create_document/4
create_document_id/4

Create a document with a specific document id.

.
create_document_id/5
create_documents/3

Create many documents.

.
create_documents/4
create_view/5

Create a view.

.
create_view/6
create_view_type/6

Create a view of a unique type.

.
create_view_type/7
create_views/4

Create many views.

.
create_views/5
database_info/2

Get information about the database.

.
database_info/3
delete_database/2

Delete the database.

.
delete_database/3
delete_document/3

Delete a document based on its id.

.
delete_document/4
delete_document_rev/4

Delete a specific revision of a document based on its id.

.
delete_document_rev/5
delete_documents/3

Delete many documents.

.
delete_documents/4
document_revision/3

Get the current revision of a document.

.
document_revision/4
invoke_view/4

Invoke a view.

.
invoke_view/5
invoke_view_keys/5

Invoke a view with a list of keys.

.
invoke_view_keys/6
replace_document/4

Replace a document based on its id.

.
replace_document/5
replace_document_rev/5

Replace a specific revision of a document based on its id.

.
replace_document_rev/6
retrieve_all_dbs/2

Retrieve a list of all the databases.

.
retrieve_all_dbs/3
retrieve_document/3

Get a document based on its id.

.
retrieve_document/4
server_info/2

Get information about the server.

.
server_info/3
update_document/4

Update a document based on its id.

.
update_document/5
update_document_rev/5

Update a specific revision of a document based on its id.

.
update_document_rev/6

Function Details

cloudi_service_handle_info/3

cloudi_service_handle_info(Request, State, Dispatcher) -> any()

cloudi_service_handle_request/11

cloudi_service_handle_request(Type, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()

cloudi_service_init/4

cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()

cloudi_service_terminate/3

cloudi_service_terminate(Reason, Timeout, State) -> any()

create_attachment/5

create_attachment(Agent::agent(), Name::service_name(), DocumentID::string(), File::string(), ContentType::string()) -> external_response({json, {struct, list()}})

Create a document attachment from a file.

The file is referenced by its filename.

create_attachment/6

create_attachment(Agent::agent(), Name::service_name(), DocumentID::string(), File::string(), ContentType::string(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

create_database/2

create_database(Agent::agent(), Name::service_name()) -> external_response(any())

Create the database.

create_database/3

create_database(Agent::agent(), Name::service_name(), Timeout::timeout_milliseconds()) -> external_response(any())

create_document/3

create_document(Agent::agent(), Name::service_name(), Doc::list()) -> external_response({json, {struct, list()}})

Create a document and allow the server to create the document id.

create_document/4

create_document(Agent::agent(), Name::service_name(), Doc::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

create_document_id/4

create_document_id(Agent::agent(), Name::service_name(), DocumentID::string(), Doc::list()) -> external_response({json, {struct, list()}})

Create a document with a specific document id.

create_document_id/5

create_document_id(Agent::agent(), Name::service_name(), DocumentID::string(), Doc::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

create_documents/3

create_documents(Agent::agent(), Name::service_name(), Documents::list()) -> external_response({json, {struct, list()}})

Create many documents.

create_documents/4

create_documents(Agent::agent(), Name::service_name(), Documents::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

create_view/5

create_view(Agent::agent(), Name::service_name(), DocName::string(), ViewName::string(), Data::list()) -> external_response({json, {struct, list()}})

Create a view.

create_view/6

create_view(Agent::agent(), Name::service_name(), DocName::string(), ViewName::string(), Data::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

create_view_type/6

create_view_type(Agent::agent(), Name::service_name(), DocName::string(), Type::string(), ViewName::string(), Data::list()) -> external_response({json, {struct, list()}})

Create a view of a unique type.

create_view_type/7

create_view_type(Agent::agent(), Name::service_name(), DocName::string(), Type::string(), ViewName::string(), Data::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

create_views/4

create_views(Agent::agent(), Name::service_name(), DocName::string(), ViewList::list()) -> external_response({json, {struct, list()}})

Create many views.

create_views/5

create_views(Agent::agent(), Name::service_name(), DocName::string(), ViewList::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

database_info/2

database_info(Agent::agent(), Name::service_name()) -> external_response(any())

Get information about the database.

database_info/3

database_info(Agent::agent(), Name::service_name(), Timeout::timeout_milliseconds()) -> external_response(any())

delete_database/2

delete_database(Agent::agent(), Name::service_name()) -> external_response(any())

Delete the database.

delete_database/3

delete_database(Agent::agent(), Name::service_name(), Timeout::timeout_milliseconds()) -> external_response(any())

delete_document/3

delete_document(Agent::agent(), Name::service_name(), DocumentID::string()) -> external_response({json, {struct, list()}})

Delete a document based on its id.

delete_document/4

delete_document(Agent::agent(), Name::service_name(), DocumentID::string(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

delete_document_rev/4

delete_document_rev(Agent::agent(), Name::service_name(), DocumentID::string(), Rev::string()) -> external_response({json, {struct, list()}})

Delete a specific revision of a document based on its id.

delete_document_rev/5

delete_document_rev(Agent::agent(), Name::service_name(), DocumentID::string(), Rev::string(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

delete_documents/3

delete_documents(Agent::agent(), Name::service_name(), Documents::list()) -> external_response({json, {struct, list()}})

Delete many documents.

delete_documents/4

delete_documents(Agent::agent(), Name::service_name(), Documents::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

document_revision/3

document_revision(Agent::agent(), Name::service_name(), DocumentID::string()) -> external_response({any(), any()})

Get the current revision of a document.

document_revision/4

document_revision(Agent::agent(), Name::service_name(), DocumentID::string(), Timeout::timeout_milliseconds()) -> external_response({any(), any()})

invoke_view/4

invoke_view(Agent::agent(), Name::service_name(), DocName::string(), ViewName::string()) -> external_response({json, {struct, list()}})

Invoke a view.

invoke_view/5

invoke_view(Agent::agent(), Name::service_name(), DocName::string(), ViewName::string(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

invoke_view_keys/5

invoke_view_keys(Agent::agent(), Name::service_name(), DocName::string(), ViewName::string(), Keys::list()) -> external_response({json, {struct, list()}})

Invoke a view with a list of keys.

invoke_view_keys/6

invoke_view_keys(Agent::agent(), Name::string(), DocName::string(), ViewName::string(), Keys::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

replace_document/4

replace_document(Agent::agent(), Name::service_name(), DocumentID::string(), Doc::list()) -> external_response({json, {struct, list()}})

Replace a document based on its id.

replace_document/5

replace_document(Agent::agent(), Name::service_name(), DocumentID::string(), Doc::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

replace_document_rev/5

replace_document_rev(Agent::agent(), Name::service_name(), DocumentID::string(), Rev::string(), Doc::list()) -> external_response({json, {struct, list()}})

Replace a specific revision of a document based on its id.

replace_document_rev/6

replace_document_rev(Agent::agent(), Name::service_name(), DocumentID::string(), Rev::string(), Doc::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

retrieve_all_dbs/2

retrieve_all_dbs(Agent::agent(), Name::service_name()) -> external_response(any())

Retrieve a list of all the databases.

retrieve_all_dbs/3

retrieve_all_dbs(Agent::agent(), Name::service_name(), Timeout::timeout_milliseconds()) -> external_response(any())

retrieve_document/3

retrieve_document(Agent::agent(), Name::service_name(), DocumentID::string()) -> external_response({json, {struct, list()}})

Get a document based on its id.

retrieve_document/4

retrieve_document(Agent::agent(), Name::service_name(), DocumentID::string(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

server_info/2

server_info(Agent::agent(), Name::service_name()) -> external_response(any())

Get information about the server.

server_info/3

server_info(Agent::agent(), Name::service_name(), Timeout::timeout_milliseconds()) -> external_response(any())

update_document/4

update_document(Agent::agent(), Name::service_name(), DocumentID::string(), Doc::list()) -> external_response({json, {struct, list()}})

Update a document based on its id.

update_document/5

update_document(Agent::agent(), Name::service_name(), DocumentID::string(), Doc::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})

update_document_rev/5

update_document_rev(Agent::agent(), Name::service_name(), DocumentID::string(), Rev::string(), Doc::list()) -> external_response({json, {struct, list()}})

Update a specific revision of a document based on its id.

update_document_rev/6

update_document_rev(Agent::agent(), Name::service_name(), DocumentID::string(), Rev::string(), Doc::list(), Timeout::timeout_milliseconds()) -> external_response({json, {struct, list()}})


Generated by EDoc, Apr 12 2015, 21:11:37.