All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shulie.druid.sql.ast.statement.SQLForStatement Maven / Gradle / Ivy

package com.shulie.druid.sql.ast.statement;

import com.shulie.druid.sql.ast.SQLExpr;
import com.shulie.druid.sql.ast.SQLName;
import com.shulie.druid.sql.ast.SQLStatement;
import com.shulie.druid.sql.ast.SQLStatementImpl;
import com.shulie.druid.sql.visitor.SQLASTVisitor;

import java.util.ArrayList;
import java.util.List;

public class SQLForStatement extends SQLStatementImpl {
    protected SQLName index;
    protected SQLExpr range;

    protected List statements = new ArrayList();

    public SQLForStatement() {

    }

    public SQLName getIndex() {
        return index;
    }

    public void setIndex(SQLName index) {
        this.index = index;
    }

    public SQLExpr getRange() {
        return range;
    }

    public void setRange(SQLExpr range) {
        if (range != null) {
            range.setParent(this);
        }
        this.range = range;
    }

    public List getStatements() {
        return statements;
    }

    @Override
    protected void accept0(SQLASTVisitor v) {
        if (v.visit(this)) {
            acceptChild(v, index);
            acceptChild(v, range);
            acceptChild(v, statements);
        }
        v.endVisit(this);

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy