Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101469651
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
Mon, Feb 10, 18:37
Size
941 B
Mime Type
text/x-php
Expires
Wed, Feb 12, 18:37 (2 d)
Engine
blob
Format
Raw Data
Handle
24156966
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