franzose / doctrine-bulk-insert
Doctrine/DBAL 的批量插入功能
v2.0
2022-06-13 06:06 UTC
Requires
- php: ^8.0
- doctrine/dbal: ^2.5|^3.3
Requires (Dev)
- mockery/mockery: ^1.5
- phpunit/phpunit: ^9.5
README
该库基于 gist,并为 Doctrine/DBAL 提供批量插入功能。
使用方法
<?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], ]);