Modify buildQuery signature for uniformity.