You are here

public function SchemaDatabaseSchema_mysql::prepareColumnComment in Schema 8

Overrides DatabaseSchemaInspectionInterface::prepareColumnComment

File

src/SchemaDatabaseSchema_mysql.php, line 48
Schema module enhancements to DatabaseSchema_mysql

Class

SchemaDatabaseSchema_mysql

Namespace

Drupal\schema

Code

public function prepareColumnComment($comment, $pdo_quote = TRUE) {

  // Truncate comment to maximum comment length.
  $comment = Unicode::truncate($this->connection
    ->prefixTables($comment), DatabaseSchema_mysql::COMMENT_MAX_COLUMN, TRUE, TRUE);
  if ($pdo_quote) {
    return $this->connection
      ->quote($comment);
  }
  return $comment;
}