Make query helper static