couchdb_connector v0.4.0 Couchdb.Connector
Your primary interface for writing to and reading from CouchDB. The exchange format here are Maps. If you want to go more low level and deal with JSON strings instead, please consider using Couchdb.Connector.Reader or Couchdb.Connector.Writer.
Summary
Functions
Create a new document from given map with given id, using no authentication. Clients must make sure that the id has not been used for an existing document in CouchDB. Either provide a UUID or consider using create_generate in case uniqueness cannot be guaranteed
Create a new document from given map with given id, using the provided basic authentication parameters. Clients must make sure that the id has not been used for an existing document in CouchDB. Either provide a UUID or consider using create_generate in case uniqueness cannot be guaranteed
Create a new document from given map with a CouchDB generated id, using no authentication. Fetching the uuid from CouchDB does of course incur a performance penalty as compared to providing one
Create a new document from given map with a CouchDB generated id, using the provided basic authentication parameters. Fetching the uuid from CouchDB does of course incur a performance penalty as compared to providing one
Fetch a single uuid from CouchDB for use in a a subsequent create operation. Clients can retrieve the returned List of UUIDs by getting the value for key “uuids”. The List contains only one element (UUID)
Retrieve the document given by database properties and id, returning it as a Map, using no authentication
Retrieve the document given by database properties and id, returning it as a Map, using the given basic auth credentials for authentication
Functions
create(Couchdb.Connector.Types.db_properties, map, String.t) :: {:ok, map} | {:error, map}
Create a new document from given map with given id, using no authentication. Clients must make sure that the id has not been used for an existing document in CouchDB. Either provide a UUID or consider using create_generate in case uniqueness cannot be guaranteed.
create(Couchdb.Connector.Types.db_properties, Couchdb.Connector.Types.basic_auth, map, String.t) :: {:ok, map} | {:error, map}
Create a new document from given map with given id, using the provided basic authentication parameters. Clients must make sure that the id has not been used for an existing document in CouchDB. Either provide a UUID or consider using create_generate in case uniqueness cannot be guaranteed.
create_generate(Couchdb.Connector.Types.db_properties, map) :: {:ok, map} | {:error, map}
Create a new document from given map with a CouchDB generated id, using no authentication. Fetching the uuid from CouchDB does of course incur a performance penalty as compared to providing one.
create_generate(Couchdb.Connector.Types.db_properties, Couchdb.Connector.Types.basic_auth, map) :: {:ok, map} | {:error, map}
Create a new document from given map with a CouchDB generated id, using the provided basic authentication parameters. Fetching the uuid from CouchDB does of course incur a performance penalty as compared to providing one.
fetch_uuid(Couchdb.Connector.Types.db_properties) :: {:ok, map} | {:error, String.t}
Fetch a single uuid from CouchDB for use in a a subsequent create operation. Clients can retrieve the returned List of UUIDs by getting the value for key “uuids”. The List contains only one element (UUID).
get(Couchdb.Connector.Types.db_properties, String.t) :: {:ok, map} | {:error, map}
Retrieve the document given by database properties and id, returning it as a Map, using no authentication.
get(Couchdb.Connector.Types.db_properties, Couchdb.Connector.Types.basic_auth, String.t) :: {:ok, map} | {:error, map}
Retrieve the document given by database properties and id, returning it as a Map, using the given basic auth credentials for authentication.