Add mode switching for chained queries.