Doctrine\DBAL\Platforms\MySqlPlatform::getClobTypeDeclarationSQL PHP Method

getClobTypeDeclarationSQL() public method

TINYTEXT : 2 ^ 8 - 1 = 255 TEXT : 2 ^ 16 - 1 = 65535 MEDIUMTEXT : 2 ^ 24 - 1 = 16777215 LONGTEXT : 2 ^ 32 - 1 = 4294967295
public getClobTypeDeclarationSQL ( array $field ) : string
$field array
return string
    public function getClobTypeDeclarationSQL(array $field)
    {
        if (!empty($field['length']) && is_numeric($field['length'])) {
            $length = $field['length'];
            if ($length <= static::LENGTH_LIMIT_TINYTEXT) {
                return 'TINYTEXT';
            }
            if ($length <= static::LENGTH_LIMIT_TEXT) {
                return 'TEXT';
            }
            if ($length <= static::LENGTH_LIMIT_MEDIUMTEXT) {
                return 'MEDIUMTEXT';
            }
        }
        return 'LONGTEXT';
    }
MySqlPlatform