Postgres::_alterSequence PHP Method

_alterSequence() protected method

Protected method which alter a sequence SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION
protected _alterSequence ( $seqrs, $name, $comment, $owner, $schema, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) : -7
$seqrs The sequence recordSet returned by getSequence()
$name The new name for the sequence
$comment The comment on the sequence
$owner The new owner for the sequence
$schema The new schema for the sequence
$increment The increment
$minvalue The min value
$maxvalue The max value
$restartvalue The starting value
$cachevalue The cache value
$cycledvalue True if cycled, false otherwise
$startvalue The sequence start value when issueing a restart
return -7
    protected function _alterSequence($seqrs, $name, $comment, $owner, $schema, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue)
    {
        $this->fieldArrayClean($seqrs->fields);
        // Comment
        $status = $this->setComment('SEQUENCE', $seqrs->fields['seqname'], '', $comment);
        if ($status != 0) {
            return -4;
        }
        // Owner
        $this->fieldClean($owner);
        $status = $this->alterSequenceOwner($seqrs, $owner);
        if ($status != 0) {
            return -5;
        }
        // Props
        $this->clean($increment);
        $this->clean($minvalue);
        $this->clean($maxvalue);
        $this->clean($restartvalue);
        $this->clean($cachevalue);
        $this->clean($cycledvalue);
        $this->clean($startvalue);
        $status = $this->alterSequenceProps($seqrs, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue);
        if ($status != 0) {
            return -6;
        }
        // Rename
        $this->fieldClean($name);
        $status = $this->alterSequenceName($seqrs, $name);
        if ($status != 0) {
            return -3;
        }
        // Schema
        $this->clean($schema);
        $status = $this->alterSequenceSchema($seqrs, $schema);
        if ($status != 0) {
            return -7;
        }
        return 0;
    }
Postgres