use different irods queries depending on type of query