package com.alibaba.druid.sql.dialect.kingbase.ast.expression;

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
import com.alibaba.druid.sql.dialect.kingbase.KingbaseSQLObject;
import com.alibaba.druid.sql.dialect.kingbase.visitor.KingbaseASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class KingbaseExprTableSource extends SQLExprTableSource implements KingbaseSQLObject {
   private SQLExpr dbLink;
   private boolean inherit;

   public SQLExpr getDbLink() {
      return this.dbLink;
   }

   public void setDbLink(SQLExpr dbLink) {
      this.dbLink = dbLink;
   }

   public boolean isInherit() {
      return this.inherit;
   }

   public void setInherit(boolean inherit) {
      this.inherit = inherit;
   }

   protected void accept0(SQLASTVisitor visitor) {
      this.accept0((KingbaseASTVisitor)visitor);
   }

   public void accept0(KingbaseASTVisitor visitor) {
      if (visitor.visit(this)) {
         if (this.expr != null) {
            this.expr.accept(visitor);
         }

         if (this.dbLink != null) {
            this.dbLink.accept(visitor);
         }

         if (this.sampling != null) {
            this.sampling.accept(visitor);
         }
      }

      visitor.endVisit(this);
   }
}
