RowCountExceptionTest::DEFAULT_EXCEPTION_MESSAGE

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php \Drupal\Tests\Core\Database\RowCountExceptionTest::DEFAULT_EXCEPTION_MESSAGE
  2. 11.x core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php \Drupal\Tests\Core\Database\RowCountExceptionTest::DEFAULT_EXCEPTION_MESSAGE

The default exception message.

File

core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php, line 18

Class

RowCountExceptionTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Database%21RowCountException.php/class/RowCountException/9" title="Exception thrown if a SELECT query trying to execute rowCount() on result." class="local">\Drupal\Core\Database\RowCountException</a>

Namespace

Drupal\Tests\Core\Database

Code

private const DEFAULT_EXCEPTION_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, use a prepareStatement() with an \$allow_row_count argument set to TRUE, execute() the Statement and get the number of matched rows via rowCount().";

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.