Submitted by Thao Huynh on December 22, 2018 - 10:38
<?php
/**
* Debugging using the database connection.
*/
/** @var \Drupal\Core\Database\Connection */
$connection = \Drupal::service('database');
$query = $connection->select('node', 'node');
$query->fields('node', ['nid'])
->condition('node.type', 'page')
// Debug.
dump($query->__toString());