In the past I was using v5 of mysql-connector-java
a lot. During LOAD DATA LOCAL INFILE
, I usually set the connection to allow loading data from inmemory as follows:
com.mysql.jdbc.Connection con;
con.setAllowLoadLocalInfile(true);
Lateron it then set the file as inputstream directly for the database statement:
((com.mysql.jdbc.Statement) ps).setLocalInfileInputStream(new ByteArrayInputStream(...))
Now I'm migrating to version 8.0.13
of the connector, that the method does not exist anymore. Moreover, one has to use java.sql.Connection
now.
How can I now set the property to allow load data on the connection explicit?
Especially as java.sql.Statement
does not have the .setLocalInfileInputStream()
method?
The developer guide even mentions that method, but does not tell how to get access to it: https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-implementation-notes.html