package ru.yandex.webmaster3.storage.util.clickhouse2.query;

/**
 * @author tsyplyaev
 */
public class And extends Where {
    And(Statement case_, Clause prev) {
        super(case_, prev, false);
    }

    @Override
    public String toString() {
        if (case_ instanceof Clause) {
            return prev.toString() + " AND (" + case_.toString() + ")";
        }
        return prev.toString() + " AND " + case_.toString();
    }
}
