Closed mxhdev closed 8 years ago
It appears, that there is no native solution for executing a sql script. However, there are some sample implementations which can be helpful.
ibatis ScriptRunner class http://www.mkyong.com/jdbc/how-to-run-a-mysql-script-using-java/ https://gist.github.com/joe776/831762
Native with already implemented classes Use the already created fileReader classes and define the content of a reset.sql file with tags. Run Execute() for each query/tag This would be a "native" solution without depending on any external library
SQL Scripts can be executed via the ScriptReader class since commit 8c05fdc
Implement execution of reset sql script. This script should be defined for every assignment / solution.
After checking one submission, the reset script should be executed in order to reset the database and make sure that each submission gets tested on the same dataset.