franzose/doctrine-bulk-insert

Bulk insert functionality for the Doctrine/DBAL

v2.1 2025-03-27 13:46 UTC

This package is auto-updated.

Last update: 2025-03-27 13:48:42 UTC


README

The library is based on the gist and provides bulk insert functionality to the Doctrine/DBAL.

Usage

<?php

use Doctrine\DBAL\Connection;
use Franzose\DoctrineBulkInsert\Query;

// Prepare database connection
$connection = new Connection(...);

// Execute query and get affected rows back
$rows = (new Query($connection))->execute('foo', [
    ['foo' => 111, 'bar' => 222],
    ['foo' => 333, 'bar' => 444],
]);