Compile a rename column command.

@param  \Nova\Database\Schema\Blueprint  $blueprint
@param  \Nova\Support\Fluent  $command
@param  \Nova\Database\Connection  $connection
@return array
337425
public function compileRenameColumn(Blueprint $blueprint, Fluent $command, Connection $connection)
    {
        $schema = $connection->getDoctrineSchemaManager();

        $table = $this->getTablePrefix().$blueprint->getTable();

        $column = $connection->getDoctrineColumn($table, $command->from);

        $tableDiff = $this->getRenamedDiff($blueprint, $command, $column, $schema);

        return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff);
    }
61682
public function compileCreate(Blueprint $blueprint, Fluent $command)
    {
        return sprintf('%s table %s (%s)',
            $blueprint->temporary ? 'create temporary' : 'create',
            $this->wrapTable($blueprint),
            implode(', ', $this->getColumns($blueprint))
        );
    }
256399
private function prepareBindingClosure($id, $blueprint, $dependencies = null): Closure
    {
        if ($this->bindings[$id]['singleton']) {
            return $this->prepareSingletonBindingClosure($id, $blueprint, $dependencies);
        }

        return $this->preparePrototypeBindingClosure($id, $blueprint, $dependencies);
    }
1046589
public function compileCreate(Blueprint $blueprint, Fluent $command)
	{
		$columns = implode(', ', $this->getColumns($blueprint));

		$sql = $blueprint->temporary ? 'create temporary' : 'create';

		$sql .= ' table '.$this->wrapTable($blueprint)." ($columns)";

		return $sql;
	}
49919
protected function getGeneralInformation($key, Blueprint $blueprint) {
        return [
            $blueprint->getName(),
            Formatter::shortArray([$blueprint->getDisplayName(), $blueprint->getPluralDisplayName()]),
            $blueprint->getController(),
            $blueprint->hasPrimaryToolbarItem() ? $blueprint->getPrimaryToolbarItem()->getIdentifier() : 'None',
            $blueprint->getIcon()
        ];
    }
72264
public function compileAdd(Blueprint $blueprint, Fluent $command)
	{
		$table = $this->wrapTable($blueprint);

		$columns = $this->prefixArray('add column', $this->getColumns($blueprint));

		foreach ($columns as $column)
		{
			$statements[] = 'alter table '.$table.' '.$column;
		}

		return $statements;
	}
265024
public function compileDropColumn(Blueprint $blueprint, Fluent $command, Connection $connection)
    {
        $tableDiff = $this->getDoctrineTableDiff(
            $blueprint, $schema = $connection->getDoctrineSchemaManager()
        );

        foreach ($command->columns as $name) {
            $tableDiff->removedColumns[$name] = $connection->getDoctrineColumn(
                $this->getTablePrefix().$blueprint->getTable(), $name
            );
        }

        return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff);
    }
484791
protected static function getSchemaBuilder(Connection $connection)
    {
        $schemaBuilder = $connection->getSchemaBuilder();
        $schemaBuilder->blueprintResolver(function ($table, $callback) {
            return new Blueprint($table, $callback);
        });

        return $schemaBuilder;
    }
404062
public function getQualifiedAutoIncrementColumn(Blueprint $blueprint)
    {
        $columns = $blueprint->getColumns();

        // search for primary key / autoIncrement column
        foreach ($columns as $column) {
            // if column is autoIncrement set the primary col name
            if ($column->autoIncrement) {
                return $column;
            }
        }
    }
545436
protected function makeCommand($connection, $connectionName)
    {
        $cmd[] = 'mysqldump -u ' . $connection['username'];
        $cmd[] = '--password=' . $connection['password'];
        $cmd[] = $connection['database'];
        $cmd[] = ' -h ' . $connection['host'];
        if ( ! empty($connection['port'])) {
            $cmd[] = '-P ' . $connection['port'];
        }
        $cmd[] = '> ' . $this->filename($connectionName);
        return implode(' ', $cmd);
    }
1080082
public function compileCreate(Blueprint $blueprint, Fluent $command, Connection $connection) {
       
        // $columns = implode(', ', $this->getColumns($blueprint));
        //$sql = 'create class '.$this->wrapTable($blueprint)." ($columns)";
        return  $sql = 'create class '.$this->wrapTable($blueprint)." extends V";
    }
736788
public function rename($source, $destination) {
        try {
            return $this->getRedis()->rename($source, $destination);
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
525531
public function compileGin(Blueprint $blueprint, Fluent $command)
    {
        $columns = $this->columnize($command->columns);

        return sprintf('CREATE INDEX %s ON %s USING GIN(%s)', $command->index, $this->wrapTable($blueprint), $columns);
    }
503867
protected function addPrimaryKeys(Blueprint $blueprint)
    {
        $primary = $this->getCommandByName($blueprint, 'primary');

        if (! is_null($primary)) {
            $columns = $this->columnize($primary->columns);

            return ", primary key ({$columns})";
        }
    }
120797
protected function resolveForeignTable($table, Blueprint $blueprint)
    {
        $referenced = explode('.', $table);

        if (count($referenced) == 2) {
            return [
                'database' => current($referenced),
                'table' => next($referenced),
            ];
        }

        return [
            'database' => $blueprint->schema(),
            'table' => current($referenced),
        ];
    }
223706
protected function expandParams(Blueprint $blueprint): Blueprint
    {
        $class = $blueprint->getClassName();
        $params = $blueprint->getParams();

        $variadicParams = [];
        foreach ($this->reflector->getParams($class) as $reflectParam) {
            $paramName = $reflectParam->getName();
            if ($reflectParam->isVariadic() && is_array($params[$paramName])) {
                $variadicParams = array_merge($variadicParams, $params[$paramName]);
                unset($params[$paramName]);
                break; // There can only be one
            }

            if ($params[$paramName] instanceof DefaultValueParam) {
                $params[$paramName] = $params[$paramName]->getValue();
            }
        }

        return $blueprint->replaceParams(array_merge($params, array_values($variadicParams)));
    }
512545
public function compilePrimary(Blueprint $blueprint, Fluent $command)
    {
        $create = $this->getCommandByName($blueprint, 'create');

        if (is_null($create)) {
            $columns = $this->columnize($command->columns);

            $table = $this->wrapTable($blueprint);

            return "alter table {$table} add constraint {$command->index} primary key ({$columns})";
        }
    }