Bulk Insert - updated 5/9/2008
This Update adds requested support for self referential fields. This is useful if you need to compute and store potentially hundreds or thousands of objects and relationships quickly. To perform the inserts it will hit the database 1 plus N/100 times per affected table and where N is the number of rows to be inserted. It will use INSERT or LOAD DATA INFILE on MySQL. Run this on your test database first and make sure all of your field defaults and null values are set appropriately as you could attempt to insert a NULL where it isn't allowed and end up with a partial insert. This code is reasonably well tested and has been used for database pre-loading and operations on live sites. My test suite, however, is focused on my own use cases. Any input, i.e. failures, for creating more tests would be appreciated. Lots of Details in the Doc String. Currently only MySQL, however there is some crude skeleton code to support other databases.
- mysql
- bulk
- insert
- load-data