本文整理汇总了PHP中BaseObject::getCreateDdl方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseObject::getCreateDdl方法的具体用法?PHP BaseObject::getCreateDdl怎么用?PHP BaseObject::getCreateDdl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseObject
的用法示例。
在下文中一共展示了BaseObject::getCreateDdl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getModifyDdl
/**
* Return DDL for sequence modification (drop with subsequent create).
*
* @param BaseObject $target Target object.
* @param string $dbType Database type (ORACLE only).
*
* @return array|string
*/
public function getModifyDdl(BaseObject $target, $dbType = '')
{
switch ($dbType) {
case "ORACLE":
return array($this->getDropDdl($dbType), $target->getCreateDdl($dbType));
default:
return "// " . get_class($this) . ":getDropDdl for database type [" . $dbType . "] not implemented";
}
}
示例2: getModifyDdl
/**
* Return DDL for constraint modification.
*
* @param BaseObject $target Target object.
* @param string $dbType Database type (MYSQL, ORACLE or MSSQL).
*
* @return array|string
*/
public function getModifyDdl(BaseObject $target, $dbType = '')
{
return array($this->getDropDdl($dbType), $target->getCreateDdl($dbType));
}