Changeset View
Changeset View
Standalone View
Standalone View
src/applications/fact/query/PhabricatorFactDatapointQuery.php
| Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | if ($this->objectPHIDs) { | ||||
| $this->dimensionMap = $object_map; | $this->dimensionMap = $object_map; | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'objectID IN (%Ld)', | 'objectID IN (%Ld)', | ||||
| $this->dimensionMap); | $this->dimensionMap); | ||||
| } | } | ||||
| $where = '('.implode(') AND (', $where).')'; | $where = qsprintf($conn, '%LA', $where); | ||||
| if ($this->limit) { | if ($this->limit) { | ||||
| $limit = qsprintf( | $limit = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'LIMIT %d', | 'LIMIT %d', | ||||
| $this->limit); | $this->limit); | ||||
| } else { | } else { | ||||
| $limit = ''; | $limit = qsprintf($conn, ''); | ||||
| } | } | ||||
| return queryfx_all( | return queryfx_all( | ||||
| $conn, | $conn, | ||||
| 'SELECT keyID, objectID, dimensionID, value, epoch | 'SELECT keyID, objectID, dimensionID, value, epoch | ||||
| FROM %T WHERE %Q %Q', | FROM %T WHERE %Q %Q', | ||||
| $table->getTableName(), | $table->getTableName(), | ||||
| $where, | $where, | ||||
| $limit); | $limit); | ||||
| } | } | ||||
| } | } | ||||