we're not going to use Query.gensql so no need for separate function