sanskrit_data.db.couchdb

Note

For undocumented classes and methods, please see superclass documentation in sanskrit_data.db.

class sanskrit_data.db.couchdb.CloudantApiClient(url)[source]

Bases: sanskrit_data.db.ClientInterface

delete_database(db_name)[source]
get_database(db_name)[source]
get_database_interface(db_name)[source]
class sanskrit_data.db.couchdb.CloudantApiDatabase(db)[source]

Bases: sanskrit_data.db.DbInterface

delete_doc(doc_id)[source]

Beware: This leaves the document in the local cache! But other methods in this class should compensate.

exists(doc_id)[source]
find(find_filter)[source]
find_by_id(id)[source]
find_by_indexed_key(index_name, key)[source]
static get_index_doc_name(name)[source]
update_doc(doc)[source]
update_index(name, fields, upsert=False)[source]
class sanskrit_data.db.couchdb.CouchdbApiClient(url)[source]

Bases: sanskrit_data.db.ClientInterface

Note

Prefer CloudantApiClient.

delete_database(db_name)[source]
get_database(db_name)[source]
get_database_interface(db_name)[source]
class sanskrit_data.db.couchdb.CouchdbApiDatabase(db)[source]

Bases: sanskrit_data.db.DbInterface

Note

Prefer CloudantApiDatabase.

delete_doc(doc_id)[source]
find(find_filter)[source]
find_by_id(id)[source]
find_by_indexed_key(index_name, key)[source]
set_revision(doc_map)[source]
update_doc(doc)[source]
sanskrit_data.db.couchdb.strip_revision_in_copy(doc_map)[source]

Strip the _rev field in a deep copy of doc_map and return it.

Parameters:doc_map (dict) – A dict representation of a JSON document.
Returns:doc_map itself without _rev