Basic implementation of dbGetQuery.
Closes #3