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

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKey;
import com.alibaba.druid.sql.dialect.mysql.ast.MySqlKey;
import com.alibaba.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;
   }
}
