[TYPO3-core] RFC #12858: Feature: Provide a DB API to insert multiple rows at once

Christian Kuhn lolli at schwarzbu.ch
Sun Jan 10 15:23:02 CET 2010


Hey,

Ries van Twisk wrote:
>>> @Xavier: Could you take a look and figure out what needs to be done for
>>> dbal? If other db's don't handle extended inserts it would be easy to
>>> iterate over the rows and call exec_INSERTquery() each in dbal again.
>>
>> AFAIK the multi-insert is only supported by Mysql. But as you point
>> out it is quite easy to run
>> multiple INSER queryies in DBAL. I reckon bringing that into DBAL is
>> as a task that you can handle ;)

Will do.


> What would be the behavior of the multiple insert if one row invalidates
> a particular constrain
> like a unique constrain for example?
> 
> Should:
> 1) The whole insert fail (all rows)
> 2) Should only the single row fail?
> 
> I don't know what MySQL's behavior is in that,
> it sounds logical to me that that all rows should fail.

Good question. I expect the whole query to fail (at least for innodb),
will test.

Regards
Christian


More information about the TYPO3-team-core mailing list