Couldn't you write code that takes the SQL of the original query manipulates it to convert it to a pass through then creates a new query based on the new SQL string?
I've never used this type of query so can't be more specific.
Perhaps you could provide some examples?