Is there an easy way to get the text of a query so I can concatenate some extra 'where' conditions onto the end?