public function explain($collectionName, $query)
    {
        $this->document = $this->db->getQueryBuilder()->explain($collectionName, $query);
        $cursor = $this->execute();

        return current($cursor->toArray());
    }
public function explain($collectionName, $query)
    {
        $this->document = $this->db->getQueryBuilder()->explain($collectionName, $query);
        $cursor = $this->execute();

        return current($cursor->toArray());
    }
public function explain ( $ collectionName , $ query ) { $ this -> document = $ this -> db -> getQueryBuilder ( ) -> explain ( $ collectionName , $ query ) ; $ cursor = $ this -> execute ( ) ; return current ( $ cursor -> toArray ( ) ) ; }
Return an explanation of the query, often useful for optimization and debugging.
@param string $collectionName collection name
@param array $query query document.
@return array explanation of the query.
Return an explanation of the query often useful for optimization and debugging .