本文整理匯總了PHP中Propel\Generator\Model\Index::getVendorInfoForType方法的典型用法代碼示例。如果您正苦於以下問題:PHP Index::getVendorInfoForType方法的具體用法?PHP Index::getVendorInfoForType怎麽用?PHP Index::getVendorInfoForType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Propel\Generator\Model\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->isUnique()) {
$type = 'UNIQUE ';
}
return $type;
}
示例2: generateBlockStorage
/**
* Generate oracle block storage
*
* @param Table|Index $object object with vendor parameters
* @param boolean $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 = "\nUSING INDEX\n";
$prefix = "PK";
} else {
$physicalParameters = "\n";
$prefix = "";
}
if ($vendorSpecific->hasParameter($prefix . 'PCTFree')) {
$physicalParameters .= "PCTFREE " . $vendorSpecific->getParameter($prefix . 'PCTFree') . "\n";
}
if ($vendorSpecific->hasParameter($prefix . 'InitTrans')) {
$physicalParameters .= "INITRANS " . $vendorSpecific->getParameter($prefix . 'InitTrans') . "\n";
}
if ($vendorSpecific->hasParameter($prefix . 'MinExtents') || $vendorSpecific->hasParameter($prefix . 'MaxExtents') || $vendorSpecific->hasParameter($prefix . 'PCTIncrease')) {
$physicalParameters .= "STORAGE\n(\n";
if ($vendorSpecific->hasParameter($prefix . 'MinExtents')) {
$physicalParameters .= " MINEXTENTS " . $vendorSpecific->getParameter($prefix . 'MinExtents') . "\n";
}
if ($vendorSpecific->hasParameter($prefix . 'MaxExtents')) {
$physicalParameters .= " MAXEXTENTS " . $vendorSpecific->getParameter($prefix . 'MaxExtents') . "\n";
}
if ($vendorSpecific->hasParameter($prefix . 'PCTIncrease')) {
$physicalParameters .= " PCTINCREASE " . $vendorSpecific->getParameter($prefix . 'PCTIncrease') . "\n";
}
$physicalParameters .= ")\n";
}
if ($vendorSpecific->hasParameter($prefix . 'Tablespace')) {
$physicalParameters .= "TABLESPACE " . $vendorSpecific->getParameter($prefix . 'Tablespace');
}
return $physicalParameters;
}