Differential D19801 Diff 47292 src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
| Show First 20 Lines • Show All 2,347 Lines • ▼ Show 20 Lines | foreach ($this->edgeLogicConstraints as $type => $constraints) { | ||||
| foreach ($list as $constraint) { | foreach ($list as $constraint) { | ||||
| $parts[] = qsprintf( | $parts[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'IF(FIELD(%T.dst, %Ls) != 0, %d, NULL)', | 'IF(FIELD(%T.dst, %Ls) != 0, %d, NULL)', | ||||
| $alias, | $alias, | ||||
| (array)$constraint->getValue(), | (array)$constraint->getValue(), | ||||
| $idx++); | $idx++); | ||||
| } | } | ||||
| $parts = implode(', ', $parts); | $parts = qsprintf($conn, '%LQ', $parts); | ||||
| $select[] = qsprintf( | $select[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'COUNT(DISTINCT(COALESCE(%Q))) %T', | 'COUNT(DISTINCT(COALESCE(%Q))) %T', | ||||
| $parts, | $parts, | ||||
| $this->buildEdgeLogicTableAliasAncestor($alias)); | $this->buildEdgeLogicTableAliasAncestor($alias)); | ||||
| } | } | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 578 Lines • Show Last 20 Lines | |||||