vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php line 12

Open in your IDE?
  1. <?php
  2. namespace Doctrine\DBAL\Platforms;
  3. use Doctrine\DBAL\Types\Types;
  4. /**
  5.  * Provides the behavior, features and SQL dialect of the MariaDB 10.2 (10.2.7 GA) database platform.
  6.  *
  7.  * Note: Should not be used with versions prior to 10.2.7.
  8.  */
  9. class MariaDb1027Platform extends MySqlPlatform
  10. {
  11.     /**
  12.      * {@inheritdoc}
  13.      *
  14.      * @link https://mariadb.com/kb/en/library/json-data-type/
  15.      */
  16.     public function getJsonTypeDeclarationSQL(array $column): string
  17.     {
  18.         return 'LONGTEXT';
  19.     }
  20.     protected function getReservedKeywordsClass(): string
  21.     {
  22.         return Keywords\MariaDb102Keywords::class;
  23.     }
  24.     protected function initializeDoctrineTypeMappings(): void
  25.     {
  26.         parent::initializeDoctrineTypeMappings();
  27.         $this->doctrineTypeMapping['json'] = Types::JSON;
  28.     }
  29. }