Skip to content

Rename batchInsert() to insertBatch() with optional $columns #332

@Tigrov

Description

@Tigrov

Mark batchInsert() as deprecated

public function batchInsert(string $table, array $columns, iterable $rows): void
{
$time = $this->beginCommand("Insert into $table");
$this->db->createCommand()->insertBatch($table, $rows, $columns)->execute();
$this->endCommand($time);
}

Add insertBatch() where $columns argument is optional:

public function insertBatch(string $table, iterable $rows, array $columns = []): void

See https://github.com/yiisoft/db/blob/dffa745e646d475b6dd993a421c26a088e1c4f0f/src/Command/AbstractCommand.php#L203

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions