Ifsnop\Mysqldump\Mysqldump::getViewStructureView PHP Method

getViewStructureView() private method

View structure extractor, create view
private getViewStructureView ( string $viewName ) : null
$viewName string Name of view to export
return null
    private function getViewStructureView($viewName)
    {
        if (!$this->dumpSettings['skip-comments']) {
            $ret = "--" . PHP_EOL . "-- View structure for view `{$viewName}`" . PHP_EOL . "--" . PHP_EOL . PHP_EOL;
            $this->compressManager->write($ret);
        }
        $stmt = $this->typeAdapter->show_create_view($viewName);
        // create views, to resolve dependencies
        // replacing tables with views
        foreach ($this->dbHandler->query($stmt) as $r) {
            // because we must replace table with view, we should delete it
            $this->compressManager->write($this->typeAdapter->drop_view($viewName));
            $this->compressManager->write($this->typeAdapter->create_view($r));
            break;
        }
    }