本文整理汇总了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;
}