Rewrite the strategy for constructing query objects.