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

/**
 * @author tsyplyaev
 */
public class Where extends Clause {
    public Statement case_;
    private final boolean prewhere;

    Where(Statement case_, Statement prev, boolean prewhere) {
        super(prev);
        this.case_ = case_;
        this.prewhere = prewhere;
    }

    @Override
    public String toString() {
        return prev.toString() + SPACE + (prewhere ? "PREWHERE " : "WHERE ") + case_.toString();
    }
}
