Added method for getting the currently selected db

...thanks to Stijn for suggesting