package com.chenyang.druid.sql.dialect.mariadb.ast;

import com.chenyang.druid.DbType;
import com.chenyang.druid.sql.ast.statement.SQLPrimaryKey;
import com.chenyang.druid.sql.dialect.mysql.ast.MySqlKey;
import com.chenyang.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

public class MariadbPrimaryKey extends MySqlKey implements SQLPrimaryKey {
   public MariadbPrimaryKey() {
      this.dbType = DbType.mysql;
   }

   protected void accept0(MySqlASTVisitor visitor) {
      if (visitor.visit((MySqlKey)this)) {
         this.acceptChild(visitor, this.getName());
         this.acceptChild(visitor, this.getColumns());
      }

      visitor.endVisit((MySqlKey)this);
   }

   public MariadbPrimaryKey clone() {
      MariadbPrimaryKey x = new MariadbPrimaryKey();
      this.cloneTo(x);
      return x;
   }
}
