Given the following code, 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();
What I have tried:
__toString()
doesn't workdpq($query)
throws an error