function ReservedWordTest::testSelectReservedWordTableSpecificField
Tests SELECT query with a specific field from a table with a reserved name.
File
- 
              core/
tests/ Drupal/ KernelTests/ Core/ Database/ ReservedWordTest.php, line 27  
Class
- ReservedWordTest
 - Tests queries that include reserved words.
 
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testSelectReservedWordTableSpecificField() : void {
  $query = $this->connection
    ->select('virtual');
  $query->addField('virtual', 'function');
  $rows = $query->execute()
    ->fetchCol();
  $this->assertSame('Function value 1', $rows[0]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.