function QueryTest::testQuotingIdentifiers
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Database/QueryTest.php \Drupal\KernelTests\Core\Database\QueryTest::testQuotingIdentifiers()
- 11.x core/tests/Drupal/KernelTests/Core/Database/QueryTest.php \Drupal\KernelTests\Core\Database\QueryTest::testQuotingIdentifiers()
Tests quoting identifiers in queries.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ QueryTest.php, line 160
Class
- QueryTest
- Tests Drupal's extended prepared statement syntax..
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testQuotingIdentifiers() {
// Use the table named an ANSI SQL reserved word with a column that is as
// well.
$result = $this->connection
->query('SELECT [update] FROM {select}')
->fetchObject();
$this->assertEquals('Update value 1', $result->update);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.