Prepare a table or column comment for database query.
$comment: The comment string to prepare.
$length: Optional upper limit on the returned string length.
The prepared comment.
Overrides Schema::prepareComment
public function prepareComment($comment, $length = NULL) {
// Work around a bug in some versions of PDO, see http://bugs.php.net/bug.php?id=41125
$comment = str_replace("'", '’', $comment);
// Truncate comment to maximum comment length.
if (isset($length)) {
// Add table prefixes before truncating.
$comment = substr($this->connection
->prefixTables($comment), 0, $length);
}
return $this->connection
->quote($comment);
}