Added a mode for raw DB queries