Postgres::alterView PHP Method

alterView() public method

Alter view properties
public alterView ( $view, $name, $owner, $schema, $comment ) : -2
$view The name of the view
$name The new name for the view
$owner The new owner for the view
$schema The new schema for the view
$comment The comment on the view
return -2
    function alterView($view, $name, $owner, $schema, $comment)
    {
        $data = $this->getView($view);
        if ($data->recordCount() != 1) {
            return -2;
        }
        $status = $this->beginTransaction();
        if ($status != 0) {
            $this->rollbackTransaction();
            return -1;
        }
        $status = $this->_alterView($data, $name, $owner, $schema, $comment);
        if ($status != 0) {
            $this->rollbackTransaction();
            return $status;
        }
        return $this->endTransaction();
    }
Postgres