franzose / doctrine-bulk-insert
Bulk insert functionality for the Doctrine/DBAL
Installs: 976 090
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 3
Forks: 9
Open Issues: 6
Requires
- php: ^8.0
- doctrine/dbal: ^2.5|^3.3
Requires (Dev)
- mockery/mockery: ^1.5
- phpunit/phpunit: ^9.5
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], ]);