Refactor for WhereWriter::writeWhereClauses()