Add query iterator, rewrite query bind/field operations using the iterator