Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Database / RowCountException.php
1 <?php
2
3 namespace Drupal\Core\Database;
4
5 /**
6  * Exception thrown if a SELECT query trying to execute rowCount() on result.
7  */
8 class RowCountException extends \RuntimeException implements DatabaseException {
9
10   public function __construct($message = NULL, $code = 0, \Exception $previous = NULL) {
11     if (!isset($message)) {
12       $message = "rowCount() is supported for DELETE, INSERT, or UPDATE statements performed with structured query builders only, since they would not be portable across database engines otherwise. If the query builders are not sufficient, set the 'return' option to Database::RETURN_AFFECTED to get the number of affected rows.";
13     }
14     parent::__construct($message, $code, $previous);
15   }
16
17 }