sanskrit_data.db.mongodb

Note

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

class sanskrit_data.db.mongodb.Client(url)[source]

Bases: sanskrit_data.db.ClientInterface

delete_database(db_name)[source]

Deletes a collection, does not bother with the database.

get_database(db_name)[source]
get_database_interface(db_name)[source]
class sanskrit_data.db.mongodb.Collection(some_collection)[source]

Bases: sanskrit_data.db.DbInterface

add_index(keys_dict, index_name)[source]
delete_doc(doc_id)[source]
find(find_filter)[source]
find_by_id(id)[source]
find_one(find_filter)[source]
update_doc(doc)[source]
sanskrit_data.db.mongodb.get_db_collection_names(db_collection_string)[source]
Parameters:db_collection_string – A string like someDb.someCollection or just someCollection, which is interpreted as someCollection.someCollection.
Returns:An object with db and collection names.