|
@@ 442-448 (lines=7) @@
|
| 439 |
|
|
| 440 |
|
// Note $inlinecount=allpages means include the total count regardless of paging..so we set the counts first |
| 441 |
|
// regardless if POData does the paging or not. |
| 442 |
|
if ($this->request->queryType == QueryType::ENTITIES_WITH_COUNT()) { |
| 443 |
|
if ($this->providers->handlesOrderedPaging()) { |
| 444 |
|
$this->request->setCountValue($result->count); |
| 445 |
|
} else { |
| 446 |
|
$this->request->setCountValue(count($result->results)); |
| 447 |
|
} |
| 448 |
|
} |
| 449 |
|
|
| 450 |
|
//Have POData perform paging if necessary |
| 451 |
|
if (!$this->providers->handlesOrderedPaging() && !empty($result->results)) { |
|
@@ 457-463 (lines=7) @@
|
| 454 |
|
|
| 455 |
|
//a bit surprising, but $skip and $top affects $count so update it here, not above |
| 456 |
|
//IE data.svc/Collection/$count?$top=10 returns 10 even if Collection has 11+ entries |
| 457 |
|
if ($this->request->queryType == QueryType::COUNT()) { |
| 458 |
|
if ($this->providers->handlesOrderedPaging()) { |
| 459 |
|
$this->request->setCountValue($result->count); |
| 460 |
|
} else { |
| 461 |
|
$this->request->setCountValue(count($result->results)); |
| 462 |
|
} |
| 463 |
|
} |
| 464 |
|
|
| 465 |
|
$segment->setResult($result->results); |
| 466 |
|
} |