Remove product literal strings in "pht()", part 18
[phabricator.git] / src / infrastructure / storage / lisk / LiskRawMigrationIterator.php
bloba7edbd7f91a27d73906abcdd7feb672d09f46f48
1 <?php
3 final class LiskRawMigrationIterator extends PhutilBufferedIterator {
5 private $conn;
6 private $table;
7 private $cursor;
8 private $column = 'id';
10 public function __construct(AphrontDatabaseConnection $conn, $table) {
11 $this->conn = $conn;
12 $this->table = $table;
15 protected function didRewind() {
16 $this->cursor = 0;
19 public function key() {
20 return idx($this->current(), $this->column);
23 protected function loadPage() {
24 $page = queryfx_all(
25 $this->conn,
26 'SELECT * FROM %T WHERE %C > %d ORDER BY ID ASC LIMIT %d',
27 $this->table,
28 $this->column,
29 $this->cursor,
30 $this->getPageSize());
32 if ($page) {
33 $this->cursor = idx(last($page), $this->column);
36 return $page;