Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phlux/query/PhluxVariableQuery.php
| Show All 31 Lines | $rows = queryfx_all( | ||||
| $table->getTableName(), | $table->getTableName(), | ||||
| $this->buildWhereClause($conn_r), | $this->buildWhereClause($conn_r), | ||||
| $this->buildOrderClause($conn_r), | $this->buildOrderClause($conn_r), | ||||
| $this->buildLimitClause($conn_r)); | $this->buildLimitClause($conn_r)); | ||||
| return $table->loadAllFromArray($rows); | return $table->loadAllFromArray($rows); | ||||
| } | } | ||||
| protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { | protected function buildWhereClause(AphrontDatabaseConnection $conn) { | ||||
| $where = array(); | $where = array(); | ||||
| if ($this->ids !== null) { | if ($this->ids !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'id IN (%Ld)', | 'id IN (%Ld)', | ||||
| $this->ids); | $this->ids); | ||||
| } | } | ||||
| if ($this->keys !== null) { | if ($this->keys !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'variableKey IN (%Ls)', | 'variableKey IN (%Ls)', | ||||
| $this->keys); | $this->keys); | ||||
| } | } | ||||
| if ($this->phids !== null) { | if ($this->phids !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'phid IN (%Ls)', | 'phid IN (%Ls)', | ||||
| $this->phids); | $this->phids); | ||||
| } | } | ||||
| $where[] = $this->buildPagingClause($conn_r); | $where[] = $this->buildPagingClause($conn); | ||||
| return $this->formatWhereClause($where); | return $this->formatWhereClause($conn, $where); | ||||
| } | } | ||||
| protected function getDefaultOrderVector() { | protected function getDefaultOrderVector() { | ||||
| return array('key'); | return array('key'); | ||||
| } | } | ||||
| public function getOrderableColumns() { | public function getOrderableColumns() { | ||||
| return array( | return array( | ||||
| Show All 21 Lines | |||||