You are here

public function Schema::prepareComment in Drupal driver for SQL Server and SQL Azure 8.2

Same name and namespace in other branches
  1. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::prepareComment()

Parameters

$comment:

int $length:

Return value

bool|string

Overrides Schema::prepareComment

2 calls to Schema::prepareComment()
Schema::addField in drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php
Override DatabaseSchema::addField().
Schema::createTable in drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php
{@Inheritdoc}

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php, line 1371
Definition of Drupal\Driver\Database\sqlsrv\Schema

Class

Schema

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function prepareComment($comment, $length = null) {

  // Truncate comment to maximum comment length.
  if (isset($length)) {

    // Add table prefixes before truncating.
    $comment = Unicode::truncateBytes($this->connection
      ->prefixTables($comment), $length, true, true);
  }
  return $this->connection
    ->quote($comment);
}