-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement MySqlBulkLoader #15
Comments
I'm working on this - I'm also intending to create a MySqlBulkCopy class that works like the SqlBulkCopy class does with MS SQL Server - so it will create an INSERT ... VALUES statement with multiple rows for a given enumerable. |
@gitsno just a notice, original MySqlBulkCopy uses LOAD DATA INFILE syntax and I think it offers much better performance for large datasets; |
Agreed - I'm not suggesting that it's preferred over LOAD DATA INFILE, but given that developers are used to working with SqlBulkCopy and it does work well, I figure it would be nice to have it as an alternative for the MySql client. If you already have the records in a .NET DataTable or IEnumerable you have to write extra code to get them into the file format that LOAD DATA INFILE expects, whereas if the SqlBulkCopy is implemented you can insert them easily. |
No objection to adding a For this issue specifically, a |
Just added, see PR #148 |
Implemented in 0.13.0. |
Clone the
MySqlBulkLoader
API (specified here: https://dev.mysql.com/doc/connector-net/en/connector-net-programming-bulk-loader.html).As an extension, support a
Stream
property instead of aFileName
. Behind the scenes, create a GUID and pass that to MySQL as theLOAD DATA LOCAL INFILE
file name (https://dev.mysql.com/doc/refman/5.7/en/load-data.html).When the
LOCAL_INFILE_Request
is received with that GUID as the name, stream the in-memory data to the server.The text was updated successfully, but these errors were encountered: