Differential D18613 Diff 44693 src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
| Show All 13 Lines | final class PhabricatorRepositoryRefCursor | ||||
| const TYPE_BOOKMARK = 'bookmark'; | const TYPE_BOOKMARK = 'bookmark'; | ||||
| const TYPE_REF = 'ref'; | const TYPE_REF = 'ref'; | ||||
| protected $repositoryPHID; | protected $repositoryPHID; | ||||
| protected $refType; | protected $refType; | ||||
| protected $refNameHash; | protected $refNameHash; | ||||
| protected $refNameRaw; | protected $refNameRaw; | ||||
| protected $refNameEncoding; | protected $refNameEncoding; | ||||
| protected $commitIdentifier; | |||||
| protected $isClosed = 0; | |||||
| private $repository = self::ATTACHABLE; | private $repository = self::ATTACHABLE; | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
| self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
| self::CONFIG_BINARY => array( | self::CONFIG_BINARY => array( | ||||
| 'refNameRaw' => true, | 'refNameRaw' => true, | ||||
| ), | ), | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'refType' => 'text32', | 'refType' => 'text32', | ||||
| 'refNameHash' => 'bytes12', | 'refNameHash' => 'bytes12', | ||||
| 'commitIdentifier' => 'text40', | |||||
| 'refNameEncoding' => 'text16?', | 'refNameEncoding' => 'text16?', | ||||
| 'isClosed' => 'bool', | |||||
| ), | ), | ||||
| self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
| 'key_cursor' => array( | 'key_ref' => array( | ||||
| 'columns' => array('repositoryPHID', 'refType', 'refNameHash'), | 'columns' => array('repositoryPHID', 'refType', 'refNameHash'), | ||||
| 'unique' => true, | |||||
| ), | ), | ||||
| ), | ), | ||||
| ) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
| } | } | ||||
| public function generatePHID() { | public function generatePHID() { | ||||
| return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
| PhabricatorRepositoryRefCursorPHIDType::TYPECONST); | PhabricatorRepositoryRefCursorPHIDType::TYPECONST); | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||