Added Database.queryExists