How can i do batch insert or update functionality through Doctrine DBAL Query Builder.
$qb = $queryBuilder->values(
array(
"name" => 'test'
"email" => '[email protected]'
)
)
->insert('test')
->execute();
Will it supports like this
$qb = $queryBuilder->values(
array(
"name" => array('test', 'test2')
"email" => array('[email protected]','[email protected]')
)
)
->insert('test')
->execute();
There is an unmerged pullrequest from some time ago, that adds this. You can try to duplicate some of this functionality in your code.
In other words - no, it's not possible to do bulk insert using DBAL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With