3 final class PhabricatorTokenCountQuery
4 extends PhabricatorOffsetPagedQuery
{
8 public function withObjectPHIDs(array $object_phids) {
9 $this->objectPHIDs
= $object_phids;
13 public function execute() {
14 $table = new PhabricatorTokenCount();
15 $conn_r = $table->establishConnection('r');
19 'SELECT objectPHID, tokenCount FROM %T %Q %Q',
20 $table->getTableName(),
21 $this->buildWhereClause($conn_r),
22 $this->buildLimitClause($conn_r));
24 return ipull($rows, 'tokenCount', 'objectPHID');
27 protected function buildWhereClause(AphrontDatabaseConnection
$conn) {
30 if ($this->objectPHIDs
) {
33 'objectPHID IN (%Ls)',
37 return $this->formatWhereClause($conn, $where);