doctrine/dbal — pull request #682 by deeky666 (2014-09-30 23:40:51+00:00)
Title: [WIP] [DBAL-218] Add bulk insert query

This is an approach to make use of database vendors' bulk row insert query syntax.
As the nature of bulk inserts usually is to insert a LOT of rows into a table (primarily from an external source), the implementation tries to focus on good performance and low memory consumption. It is NOT intended for `INSERT INTO ... SELECT ...` statement queries.

TODO:

- Add an "executor" class that encapsulates the `BulkInsertQuery` object, adds options like bulk size and internally automatically evaluates the underlying platform's limits for a single `INSERT` statement and splits queries accordingly.
- Evaluate platforms' max insert rows per `INSERT` statement and implement in platforms.
- Add unit tests for quoted identifiers.
- Add functional tests.

Future additions:

- Add support for expressions.
- Query builder (if there will be more bulk insert queries like `INSERT INTO ... SELECT ...`)?

Open for discussion. Ideas welcome!