As discussed in IRC, I can't query Diviner atoms by PHID. To verify this, I used the following script:
<?php require_once '/usr/src/phabricator/scripts/__init_script__.php'; $phid = 'PHID-ATOM-voo47pa4nqtyotr3hoag'; $atoms = id(new DivinerAtomQuery()) ->setViewer(PhabricatorUser::getOmnipotentUser()) ->withPHIDs(array($phid)) ->execute(); echo pht('Returned %d results.', count($atoms))."\n"; $table = new DivinerLiveSymbol(); $conn_r = $table->establishConnection('r'); $atoms = queryfx_all( $conn_r, 'SELECT * FROM %T WHERE phid = %s', $table->getTableName(), $phid); echo pht('Returned %d results.', count($atoms))."\n";
The output was as follows:
Returned 0 results. Returned 1 results.