Query API refinements.