Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/customfield/storage/PhabricatorCustomFieldNumericIndexStorage.php
13419 views
1
<?php
2
3
abstract class PhabricatorCustomFieldNumericIndexStorage
4
extends PhabricatorCustomFieldIndexStorage {
5
6
protected function getConfiguration() {
7
return array(
8
self::CONFIG_COLUMN_SCHEMA => array(
9
'indexKey' => 'bytes12',
10
'indexValue' => 'sint64',
11
),
12
self::CONFIG_KEY_SCHEMA => array(
13
'key_join' => array(
14
'columns' => array('objectPHID', 'indexKey', 'indexValue'),
15
),
16
'key_find' => array(
17
'columns' => array('indexKey', 'indexValue'),
18
),
19
),
20
) + parent::getConfiguration();
21
}
22
23
public function formatForInsert(AphrontDatabaseConnection $conn) {
24
return qsprintf(
25
$conn,
26
'(%s, %s, %d)',
27
$this->getObjectPHID(),
28
$this->getIndexKey(),
29
$this->getIndexValue());
30
}
31
32
public function getIndexValueType() {
33
return 'int';
34
}
35
36
}
37
38