私はPHPのazureから1000以上の行を取得しようとしています。 まず、私はフィルタークラスを使用することができません。名前空間そのwhileループが無限ループ にGNGされた後紺碧のテーブルで1000行以上を取得する方法php
フィルタクラス を使用するために追加される任意の助けが必要$ 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);
}
リンクメートル使用しては、あなたがテーブルの上X(番号)のエンティティを選択するために、MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions
クラスのsetTop()
機能を活用することができます PHP - Azure Table Storage in with more than 1000 entities
今のところどれアップデート:
は、次のコードスニペットを考えてみてください? –