Using JDBI 3, I would like to execute unmodified SQL from a file (created by mysqldump, for what it's worth). Unfortunately, JDBI is very opinionated when it comes to what it considers legal SQL, because it's default use case is doing stuff with SQL, not just blindly executing it.
I have already turned off the TemplatingEngine through jdbi.setTemplateEngine(TemplateEngine.NOP);
, but the internal lexer is still running over the SQL, causing issues with statements such as INSERT INTO folders (path) VALUES ('c:\\')
and, for a reason I haven't managed to track down, //
(trying to insert a URL as a value).
Is there any way to disable or restrict the lexer ? Any other good advice on executing arbitrary, multi-line SQL through JDBI or, if I have to, JDBC ?