You are here

public function SchemaDatabaseSchema_mysql::prepareTableComment in Schema 8

Overrides DatabaseSchemaInspectionInterface::prepareTableComment

1 call to SchemaDatabaseSchema_mysql::prepareTableComment()
SchemaDatabaseSchema_mysql::updateTableComment in src/SchemaDatabaseSchema_mysql.php

File

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

Class

SchemaDatabaseSchema_mysql

Namespace

Drupal\schema

Code

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

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