Page MenuHomestyx hydra

HeraldEditLogQuery.php
No OneTemporary

HeraldEditLogQuery.php

<?php
final class HeraldEditLogQuery extends PhabricatorOffsetPagedQuery {
private $ruleIDs;
public function withRuleIDs(array $rule_ids) {
$this->ruleIDs = $rule_ids;
return $this;
}
public function execute() {
$table = new HeraldRuleEdit();
$conn_r = $table->establishConnection('r');
$where = $this->buildWhereClause($conn_r);
$order = $this->buildOrderClause($conn_r);
$limit = $this->buildLimitClause($conn_r);
$data = queryfx_all(
$conn_r,
'SELECT log.* FROM %T log %Q %Q %Q',
$table->getTableName(),
$where,
$order,
$limit);
return $table->loadAllFromArray($data);
}
private function buildWhereClause($conn_r) {
$where = array();
if ($this->ruleIDs) {
$where[] = qsprintf(
$conn_r,
'ruleID IN (%Ld)',
$this->ruleIDs);
}
return $this->formatWhereClause($where);
}
private function buildOrderClause($conn_r) {
return 'ORDER BY id DESC';
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 21, 2:21 PM (1 d, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
340064
Default Alt Text
HeraldEditLogQuery.php (998 B)

Event Timeline