package com.chenyang.druid.sql.dialect.postgresql.ast.stmt.alterTable;

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableItem;
import com.chenyang.druid.sql.dialect.postgresql.ast.PGSQLObjectImpl;
import com.chenyang.druid.sql.dialect.postgresql.visitor.PGASTVisitor;

public class PGAlterTableRenameTo extends PGSQLObjectImpl implements SQLAlterTableItem {
   private SQLExpr to;

   public void accept0(PGASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.to);
      }

      visitor.endVisit(this);
   }

   public SQLExpr getTo() {
      return this.to;
   }

   public void setTo(SQLExpr to) {
      to.setParent(this);
      this.to = to;
   }

   public PGAlterTableRenameTo clone() {
      PGAlterTableRenameTo c = new PGAlterTableRenameTo();
      c.setTo(this.to.clone());
      return c;
   }
}
