Page MenuHomePhorge

PhabricatorDiagramQuery.php
No OneTemporary

PhabricatorDiagramQuery.php

<?php
final class PhabricatorDiagramQuery
extends PhabricatorCursorPagedPolicyAwareQuery {
protected $phids;
public function withPHIDs(array $phids) {
$this->phids = $phids;
return $this;
}
protected function loadPage() {
$table = new Diagram();
$conn_r = $table->establishConnection('r');
$data = queryfx_all(
$conn_r,
'SELECT *
FROM %T
%Q %Q %Q',
$table->getTableName(),
$this->buildWhereClause($conn_r),
$this->buildOrderClause($conn_r),
$this->buildLimitClause($conn_r));
return $table->loadAllFromArray($data);
}
protected function buildWhereClause(AphrontDatabaseConnection $conn_r) {
$where = array();
$where[] = $this->buildPagingClause($conn_r);
if ($this->phids !== null) {
$where[] = qsprintf(
$conn_r,
'phid IN (%Ls)',
$this->phids);
}
return $this->formatWhereClause($conn_r, $where);
}
public function getQueryApplicationClass() {
return DiagramApplication::class;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Jan 19, 17:37 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127036
Default Alt Text
PhabricatorDiagramQuery.php (1 KB)

Event Timeline