Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1070329
DifferentialCommentQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
941 B
Referenced Files
None
Subscribers
None
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
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jun 29, 3:36 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
262344
Default Alt Text
DifferentialCommentQuery.php (941 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment