Move dbquery struct to main header