Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F568430
LiskRawMigrationIterator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
798 B
Referenced Files
None
Subscribers
None
LiskRawMigrationIterator.php
View Options
<?php
final
class
LiskRawMigrationIterator
extends
PhutilBufferedIterator
{
private
$conn
;
private
$table
;
private
$cursor
;
private
$column
=
'id'
;
public
function
__construct
(
AphrontDatabaseConnection
$conn
,
$table
)
{
$this
->
conn
=
$conn
;
$this
->
table
=
$table
;
}
protected
function
didRewind
()
{
$this
->
cursor
=
0
;
}
#[\ReturnTypeWillChange]
public
function
key
()
{
return
idx
(
$this
->
current
(),
$this
->
column
);
}
protected
function
loadPage
()
{
$page
=
queryfx_all
(
$this
->
conn
,
'SELECT * FROM %T WHERE %C > %d ORDER BY ID ASC LIMIT %d'
,
$this
->
table
,
$this
->
column
,
$this
->
cursor
,
$this
->
getPageSize
());
if
(
$page
)
{
$this
->
cursor
=
idx
(
last
(
$page
),
$this
->
column
);
}
return
$page
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:26 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
124500
Default Alt Text
LiskRawMigrationIterator.php (798 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment