Sortie du snippet Doctrine "Exécuter des requêtes SQL brutes avec Doctrine"

Environnement :

  • Strangebuzz Snippet VM : 2.6.0
  • Symfony : 5.2.6

Sortie du code exécuté :

-- $statement->fetchAllAssociative() --
SELECT type, count(*) AS count FROM article WHERE id > ? GROUP BY type

array(2) {
  [0]=>
  array(2) {
    ["type"]=>
    string(9) "blog_post"
    ["count"]=>
    string(2) "21"
  }
  [1]=>
  array(2) {
    ["type"]=>
    string(7) "snippet"
    ["count"]=>
    string(3) "100"
  }
}
-- $this->connection->fetchAllAssociative() --
SELECT type, count(*) AS count FROM article GROUP BY type

array(2) {
  [0]=>
  array(2) {
    ["type"]=>
    string(9) "blog_post"
    ["count"]=>
    string(2) "24"
  }
  [1]=>
  array(2) {
    ["type"]=>
    string(7) "snippet"
    ["count"]=>
    string(3) "117"
  }
}
-- $this->entityManager->createNativeQuery() --
array(2) {
  [0]=>
  array(2) {
    ["type"]=>
    string(9) "blog_post"
    ["count"]=>
    string(2) "24"
  }
  [1]=>
  array(2) {
    ["type"]=>
    string(7) "snippet"
    ["count"]=>
    string(3) "117"
  }
}