Database Interface Tools (regolith.database
)¶
Helps manage mongodb setup and connections.
- regolith.database.connect(rc, dbs=None)¶
Context manager for ensuring that database is properly setup and torn down
- regolith.database.dump_database(db, client, rc)¶
Dumps a database
- regolith.database.dump_git_database(db, client, rc)¶
Dumps a git database
- regolith.database.dump_hg_database(db, client, rc)¶
Dumps an hg database
- regolith.database.dump_local_database(db, client, rc)¶
Dumps a local database
- regolith.database.load_database(db, client, rc)¶
Loads a database
- regolith.database.load_git_database(db, client, rc)¶
Loads a git database
- regolith.database.load_hg_database(db, client, rc)¶
Loads an hg database
- regolith.database.load_local_database(db, client, rc)¶
Loads a local database
- regolith.database.load_mongo_database(db, client)¶
Load a mongo database.
- regolith.database.open_dbs(rc, dbs=None)¶
Open the databases
- Parameters:
rc (RunControl instance) – The rc which has links to the dbs
dbs (set or None, optional) – The databases to load. If None load all, defaults to None
- Returns:
client – The database client
- Return type:
{FileSystemClient, MongoClient}