Given the following examplecode, how can I print the SQL that is generated?
$bundle='my_bundle_type';
$query = \Drupal::entityQuery('node');
$query->condition('status', 1);
$query->condition('type', $bundle);
$entity_ids = $query->execute();
How can I print the SQL that is generated ?
What I have tried:
- __toString() -
__toString()
doesn't work; dpq($query)work - doesn't work ,
dpq($query)
throws an error;error
Regards,
Oleg