<?php

declare(strict_types=1);

namespace PpPhp\Core\Database\Dialect;

/**
 * TiDB adapter.
 *
 * TiDB is wire-compatible with MySQL and is consumed through the same PDO_MYSQL
 * driver, so it inherits the entire MySQL dialect — backtick identifiers,
 * AUTO_INCREMENT keys, `ENGINE=InnoDB` table options (TiDB parses and accepts
 * them), information_schema introspection and the full ALTER path all carry
 * over unchanged. Foreign keys are supported from TiDB 6.6 onward. This
 * subclass exists so the engine is a first-class, correctly-labelled choice in
 * the designer with its own default port (4000), rather than masquerading as
 * plain MySQL.
 *
 * Note: like MySQL, TiDB does not offer multi-statement transactional DDL, so
 * the inherited `transactional_ddl => false` capability is correct. In a
 * distributed deployment AUTO_INCREMENT values are unique but not necessarily
 * gap-free — expected, and never relied upon by generated apps.
 */
final class TiDbDialect extends MySqlDialect
{
    public function __construct()
    {
        parent::__construct('tidb');
    }
}
