public class SqlFileRunner extends Object
| Constructor and Description |
|---|
SqlFileRunner() |
public static int execute(File baseDirectory, String jdbcUrl, String jdbcUser, String jdbcPassword, String... initSql) throws IOException, SQLException
baseDirectory - the directory to search for files named *.sql, search is done recursively in
subdirectoriesjdbcUrl - the database connect urljdbcUser - the database userjdbcPassword - the database passwordinitSql - initial sql which is executed when connection is createdIOException - if baseDirectory is not a directorySQLException - when the database connection can't be created, or a script contains errorsCopyright © 2014. All rights reserved.