public function Schema::prepareComment

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Core/Database/Schema.php \Drupal\Core\Database\Schema::prepareComment()
  2. 9.x drupal/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php \Drupal\Core\Database\Driver\mysql\Schema::prepareComment()

Prepare a table or column comment for database query.

Parameters

$comment: The comment string to prepare.

$length: Optional upper limit on the returned string length.

Return value

The prepared comment.

3 calls to Schema::prepareComment()
Schema::addField in drupal/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
Add a new field to a table.
Schema::changeField in drupal/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
Change a field definition.
Schema::createTableSql in drupal/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
Generate SQL to create a new table from a Drupal schema definition.
1 method overrides Schema::prepareComment()
Schema::prepareComment in drupal/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php
Prepare a table or column comment for database query.

File

drupal/core/lib/Drupal/Core/Database/Schema.php, line 706
Definition of Drupal\Core\Database\Schema

Class

Schema

Namespace

Drupal\Core\Database

Code

public function prepareComment($comment, $length = NULL) {
  return $this->connection
    ->quote($comment);
}