/** * Gets the SQL to create a sequence on this platform. * * @param \Doctrine\DBAL\Schema\Sequence $sequence * @return string */ public function getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) { return 'CREATE SEQUENCE ' . $sequence->getName() . ' INCREMENT BY ' . $sequence->getAllocationSize() . ' MINVALUE ' . $sequence->getInitialValue() . ' START ' . $sequence->getInitialValue(); }
/** * @param Sequence $sequence */ public function acceptSequence(Sequence $sequence) { $this->_sequences[] = $this->_platform->getDropSequenceSQL($sequence->getName()); }
/** * @param Sequence $sequence */ protected function _addSequence(Sequence $sequence) { $seqName = strtolower($sequence->getName()); if (isset($this->_sequences[$seqName])) { throw SchemaException::sequenceAlreadyExists($seqName); } $this->_sequences[$seqName] = $sequence; }
/** * {@inheritdoc} */ public function acceptSequence(Sequence $sequence) { if (!$sequence->isInDefaultNamespace($this->schema->getName())) { $this->schema->dropSequence($sequence->getName()); } }
/** * Accept an sequence * * @param Sequence $sequence a sequence object * * @return void */ public function acceptSequence(Sequence $sequence) { $this->schemaArray['sequence'][$sequence->getName()] = array('name' => $sequence->getName(), 'allocationsize' => $sequence->getAllocationSize(), 'initialvalue' => $sequence->getInitialValue()); }