class ConditionBuilder {

    public ConditionList buildUpdateConditions(List<Segment> filtered) {
        /*
         * There are there kind of insert for mysql:
         * insert into table (column1, column2...) value/values (value list)
         * insert into table SET column1 = value1, column2 = value2, ...
         * insert into table select *
         * 
         * And every sql can be append with ON DUPLICATE KEY UPDATE assignment_lis :(
         */
        if(filtered.contains(SegmentConstants.INSERT)) {
            if(filtered.contains(SegmentConstants.SELECT) || filtered.contains(SegmentConstants.SET)) {
                filtered = filterColumnList(filtered);
                return buildQueryConditions(filtered);
            }
            
            return buildByParameters(filtered);
        }
        
        if(filtered.contains(SegmentConstants.DELETE)) {
            return buildQueryConditions(filtered);
        }
        
        /**
         * For UPDATE, the SET section will be union with WHERE section
         */
        if(filtered.contains(SegmentConstants.UPDATE)) {
            return buildQueryConditions(filtered);
        }
        
        return buildByParameters(filtered);
    }

}