Doctrine\OrientDB\Query\Query::indexCount PHP Méthode

indexCount() public méthode

Count the elements of the index $indexName.
public indexCount ( string $indexName )
$indexName string
    public function indexCount($indexName)
    {
        $commandClass = $this->getCommandClass('index.count');
        $this->command = new $commandClass($indexName);
        return $this->command;
    }

Usage Example

 public function testIndexDrop()
 {
     $query = new Query();
     $query->indexCount('index_name_2');
     $this->assertHttpStatus(200, $this->doQuery($query));
     $query->unindex('index_name_2');
     $this->assertHttpStatus(200, $this->doQuery($query));
     $query->indexCount('index_name_2');
     $this->assertHttpStatus(500, $this->doQuery($query));
     $query->unindex('in', 'OGraphEdge');
     $this->assertHttpStatus(200, $this->doQuery($query));
 }