Added a utility to build a query string from the results of a query expression.