本文整理汇总了PHP中Doctrine\DBAL\Platforms\AbstractPlatform::getDropSequenceSql方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPlatform::getDropSequenceSql方法的具体用法?PHP AbstractPlatform::getDropSequenceSql怎么用?PHP AbstractPlatform::getDropSequenceSql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\DBAL\Platforms\AbstractPlatform
的用法示例。
在下文中一共展示了AbstractPlatform::getDropSequenceSql方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toSql
/**
* @param AbstractPlatform $platform
* @param bool $saveMode
* @return array
*/
protected function _toSql(AbstractPlatform $platform, $saveMode = false)
{
$sql = array();
if ($platform->supportsForeignKeyConstraints() && $saveMode == false) {
foreach ($this->orphanedForeignKeys as $orphanedForeignKey) {
$sql[] = $platform->getDropForeignKeySql($orphanedForeignKey, $orphanedForeignKey->getLocalTableName());
}
}
if ($platform->supportsSequences() == true) {
foreach ($this->changedSequences as $sequence) {
$sql[] = $platform->getDropSequenceSql($sequence);
$sql[] = $platform->getCreateSequenceSql($sequence);
}
if ($saveMode === false) {
foreach ($this->removedSequences as $sequence) {
$sql[] = $platform->getDropSequenceSql($sequence);
}
}
foreach ($this->newSequences as $sequence) {
$sql[] = $platform->getCreateSequenceSql($sequence);
}
}
foreach ($this->newTables as $table) {
$sql = array_merge($sql, $platform->getCreateTableSql($table, AbstractPlatform::CREATE_FOREIGNKEYS | AbstractPlatform::CREATE_INDEXES));
}
if ($saveMode === false) {
foreach ($this->removedTables as $table) {
$sql[] = $platform->getDropTableSql($table);
}
}
foreach ($this->changedTables as $tableDiff) {
$sql = array_merge($sql, $platform->getAlterTableSql($tableDiff));
}
return $sql;
}
示例2: dropSequence
/**
* Drops a sequence with a given name.
*
* @param string $name The name of the sequence to drop.
*/
public function dropSequence($name)
{
$this->_execSql($this->_platform->getDropSequenceSql($name));
}
示例3: acceptSequence
/**
* @param Sequence $sequence
*/
public function acceptSequence(Sequence $sequence)
{
$this->_sequences[] = $this->_platform->getDropSequenceSql($sequence->getName());
}