如何在azure表php中检索超过1000行

I am trying to get more than 1000 rows from azure in php. First of all i am not able to use filter class. which namespace need to be added to use filter class after that while loop is gng in infinite loop any help

$tableRestProxy = ServicesBuilder::getInstance()->createTableService($this->connectionString); $filter = "( PartitionKey eq '$id' )";

$options = new QueryEntitiesOptions();
$options->setFilter(Filter::applyQueryString($filter));

$result = $tableRestProxy->queryEntities('test', $options);
$entities = $result->getEntities();

$nextPartitionKey = $result->getNextPartitionKey();
$nextRowKey = $result->getNextRowKey();

while (!is_null($nextRowKey) && !is_null($nextPartitionKey) ) {

    $options = new QueryEntitiesOptions();
    $options->setNextPartitionKey($nextPartitionKey);
    $options->setNextRowKey($nextRowKey);
    $options->setFilter(Filter::applyQueryString($filter));

    $result2 = $tableRestProxy->queryEntities("test", $options);
    $newentities = $result2->getEntities();
    $entities=array_merge($newentities, $entities);    

}

link m using is PHP - Azure Table Storage in with more than 1000 entities

You can leverage setTop() function of MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions class to select the top X (number) entities of the table.

And according the description at https://github.com/Azure/azure-storage-php/blob/master/src/Table/Models/QueryEntitiesOptions.php#L148, we can find that the filter classes have moved into the namespace MicrosoftAzure\Storage\Table\Models\Filters

If you want to use the filter classes in the new Azure Storage SDK for PHP, you can try to include the package as:

use MicrosoftAzure\Storage\Table\Models\Filters\QueryStringFilter;

Please consider the following code snippet:

use MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions;
use MicrosoftAzure\Storage\Table\Models\Filters\QueryStringFilter;
$options = new QueryEntitiesOptions();
$filter = new QueryStringFilter("(RowKey eq '".$id."')");
$options->setFilter($filter);
$options->setTop(1000);