Class FileQueryResultCallable

java.lang.Object
net.hironico.minisql.ctrl.QueryResultCallable
net.hironico.minisql.ctrl.FileQueryResultCallable
All Implemented Interfaces:
Callable<List<SQLResultSetTableModel>>

public class FileQueryResultCallable extends QueryResultCallable
Same as QueryResultCallable but reads the contents of the given file path to invoke the QueryResultCallable constructor.
Important: the given file contents will be executed in batchMode = true meaning that commit instructions will be invoked between each SQL statements separated by the "statement separator" property in the configuration of the connection.
  • Constructor Details

    • FileQueryResultCallable

      public FileQueryResultCallable(Path filePath, DbConfig config) throws IOException
      Loads the contents of the given file path and then pass it to the QueryResultCallable super implementation This constructor throws IOException id it is not possible to read from the given file path.
      Parameters:
      filePath - the file to load the query(ies) from
      config - the DB config to use to run the queries of the given file path
      Throws:
      IOException - in case the file is not readable