Differential D10526 Diff 25300 src/infrastructure/customfield/storage/PhabricatorCustomFieldNumericIndexStorage.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/storage/PhabricatorCustomFieldNumericIndexStorage.php
<?php | <?php | ||||
abstract class PhabricatorCustomFieldNumericIndexStorage | abstract class PhabricatorCustomFieldNumericIndexStorage | ||||
extends PhabricatorCustomFieldIndexStorage { | extends PhabricatorCustomFieldIndexStorage { | ||||
public function getConfiguration() { | |||||
return array( | |||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'indexKey' => 'bytes12', | |||||
'indexValue' => 'sint64', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_join' => array( | |||||
'columns' => array('objectPHID', 'indexKey', 'indexValue'), | |||||
), | |||||
'key_find' => array( | |||||
'columns' => array('indexKey', 'indexValue'), | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | |||||
} | |||||
public function formatForInsert(AphrontDatabaseConnection $conn) { | public function formatForInsert(AphrontDatabaseConnection $conn) { | ||||
return qsprintf( | return qsprintf( | ||||
$conn, | $conn, | ||||
'(%s, %s, %d)', | '(%s, %s, %d)', | ||||
$this->getObjectPHID(), | $this->getObjectPHID(), | ||||
$this->getIndexKey(), | $this->getIndexKey(), | ||||
$this->getIndexValue()); | $this->getIndexValue()); | ||||
} | } | ||||
public function getIndexValueType() { | public function getIndexValueType() { | ||||
return 'int'; | return 'int'; | ||||
} | } | ||||
} | } |