BlueSpice MediaWiki REL1_27
|
Public Member Functions | |
getTableFields () | |
getFetchFields () | |
getTableIndexes () | |
getWhereConds (SMWDataItem $dataItem) | |
getInsertValues (SMWDataItem $dataItem) | |
getIndexField () | |
getLabelField () | |
dataItemFromDBKeys ($dbkeys) | |
![]() | |
__construct (SMWSQLStore3 $store) | |
getTableFields () | |
getFetchFields () | |
getTableIndexes () | |
getWhereConds (SMWDataItem $dataItem) | |
getInsertValues (SMWDataItem $dataItem) | |
getIndexField () | |
getLabelField () | |
dataItemFromDBKeys ($dbkeys) | |
Public Attributes | |
const | MAX_HASH_LENGTH = 72 |
Static Protected Member Functions | |
static | makeHash ($string) |
Additional Inherited Members | |
![]() | |
$store | |
This class implements Store access to blob (string) data items.
SMWDIHandlerBlob::dataItemFromDBKeys | ( | $dbkeys | ) |
SMWDIHandlerBlob::getFetchFields | ( | ) |
SMWDIHandlerBlob::getIndexField | ( | ) |
Method to return the field used to select this type of DataItem
SMWDIHandlerBlob::getInsertValues | ( | SMWDataItem | $dataItem | ) |
Method to return an array of fields=>values for a DataItem This array is used to perform all insert operations into the DB To optimize return minimum fields having indexes
SMWDIHandlerBlob::getLabelField | ( | ) |
Method to return the field used to select this type of DataItem using the label
SMWDIHandlerBlob::getTableFields | ( | ) |
Method to return array of fields for a DI type
SMWDIHandlerBlob::getTableIndexes | ( | ) |
SMWDIHandlerBlob::getWhereConds | ( | SMWDataItem | $dataItem | ) |
Method to return an array of fields=>values for a DataItem
|
staticprotected |
Method to make a hashed representation for strings of length greater than self::MAX_HASH_LENGTH to be used for selecting and sorting.
$string | string |
const SMWDIHandlerBlob::MAX_HASH_LENGTH = 72 |
Maximal number of bytes (chars) to be stored in the hash field of the table. Must not be bigger than 255 (the length of our VARCHAR field in the DB). Strings that are longer than this will be stored as a blob, and the hash will only start with the original string but the last 32 bytes are used for a hash. So the minimal portion of the string that is stored literally in the hash is 32 chars less.
The value of 72 was chosen since it leads to a smaller index size at the cost of needing more blobs in cases where many strings are of length 73 to 255. But keeping the index small seems more important than saving disk space. Also, with 72 bytes there are at least 40 bytes of content available for sorting and prefix matching, which should be more than enough in most contexts.