Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118888732
DifferentialCommentQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 22, 18:36
Size
941 B
Mime Type
text/x-php
Expires
Tue, Jun 24, 18:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26935525
Attached To
rPH Phabricator
DifferentialCommentQuery.php
View Options
<?php
/**
* Temporary wrapper for transitioning Differential to ApplicationTransactions.
*/
final
class
DifferentialCommentQuery
extends
PhabricatorOffsetPagedQuery
{
private
$revisionIDs
;
public
function
withRevisionIDs
(
array
$ids
)
{
$this
->
revisionIDs
=
$ids
;
return
$this
;
}
public
function
execute
()
{
$table
=
new
DifferentialComment
();
$conn_r
=
$table
->
establishConnection
(
'r'
);
$data
=
queryfx_all
(
$conn_r
,
'SELECT * FROM %T %Q %Q'
,
$table
->
getTableName
(),
$this
->
buildWhereClause
(
$conn_r
),
$this
->
buildLimitClause
(
$conn_r
));
return
$table
->
loadAllFromArray
(
$data
);
}
private
function
buildWhereClause
(
AphrontDatabaseConnection
$conn_r
)
{
$where
=
array
();
if
(
$this
->
revisionIDs
)
{
$where
[]
=
qsprintf
(
$conn_r
,
'revisionID IN (%Ld)'
,
$this
->
revisionIDs
);
}
return
$this
->
formatWhereClause
(
$where
);
}
}
Event Timeline
Log In to Comment