本文整理匯總了PHP中Index::getVendorInfoForType方法的典型用法代碼示例。如果您正苦於以下問題:PHP Index::getVendorInfoForType方法的具體用法?PHP Index::getVendorInfoForType怎麽用?PHP Index::getVendorInfoForType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Index
的用法示例。
在下文中一共展示了Index::getVendorInfoForType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getIndexType
protected function getIndexType(Index $index)
{
$type = '';
$vendorInfo = $index->getVendorInfoForType($this->getDatabaseType());
if ($vendorInfo && $vendorInfo->getParameter('Index_type')) {
$type = $vendorInfo->getParameter('Index_type') . ' ';
} elseif ($index->getIsUnique()) {
$type = 'UNIQUE ';
}
return $type;
}
示例2: generateBlockStorage
/**
* Generate oracle block storage
*
* @param Table|Index $object object with vendor parameters
* @param bool $isPrimaryKey is a primary key vendor part
*
* @return string oracle vendor sql part
*/
public function generateBlockStorage($object, $isPrimaryKey = false)
{
$vendorSpecific = $object->getVendorInfoForType('oracle');
if ($vendorSpecific->isEmpty()) {
return '';
}
if ($isPrimaryKey) {
$physicalParameters = "\r\nUSING INDEX\r\n";
$prefix = "PK";
} else {
$physicalParameters = "\n";
$prefix = "";
}
if ($vendorSpecific->hasParameter($prefix . 'PCTFree')) {
$physicalParameters .= "PCTFREE " . $vendorSpecific->getParameter($prefix . 'PCTFree') . "\r\n";
}
if ($vendorSpecific->hasParameter($prefix . 'InitTrans')) {
$physicalParameters .= "INITRANS " . $vendorSpecific->getParameter($prefix . 'InitTrans') . "\r\n";
}
if ($vendorSpecific->hasParameter($prefix . 'MinExtents') || $vendorSpecific->hasParameter($prefix . 'MaxExtents') || $vendorSpecific->hasParameter($prefix . 'PCTIncrease')) {
$physicalParameters .= "STORAGE\r\n(\r\n";
if ($vendorSpecific->hasParameter($prefix . 'MinExtents')) {
$physicalParameters .= "\tMINEXTENTS " . $vendorSpecific->getParameter($prefix . 'MinExtents') . "\r\n";
}
if ($vendorSpecific->hasParameter($prefix . 'MaxExtents')) {
$physicalParameters .= "\tMAXEXTENTS " . $vendorSpecific->getParameter($prefix . 'MaxExtents') . "\r\n";
}
if ($vendorSpecific->hasParameter($prefix . 'PCTIncrease')) {
$physicalParameters .= "\tPCTINCREASE " . $vendorSpecific->getParameter($prefix . 'PCTIncrease') . "\r\n";
}
$physicalParameters .= ")\r\n";
}
if ($vendorSpecific->hasParameter($prefix . 'Tablespace')) {
$physicalParameters .= "TABLESPACE " . $vendorSpecific->getParameter($prefix . 'Tablespace');
}
return $physicalParameters;
}