Class DatabaseLoader

    • Constructor Detail

      • DatabaseLoader

        public DatabaseLoader​(String dbName)
        Constructor.
        Parameters:
        dbName - The name of the database to create for this loader.
    • Method Detail

      • getConnection

        public Connection getConnection()
                                 throws SQLException
        Fetches a JDBC connection to the underlying H2 database.
        Returns:
        a JDBC connection
        Throws:
        SQLException - on error
      • refreshTempTable

        public void refreshTempTable​(Table table,
                                     List<List<Object>> records)
                              throws SQLException
        Loads a temporary table with a set of newly fetched records.
        Parameters:
        table - The table to reload.
        records - The records to load in.
        Throws:
        SQLException - If an error occurs.
      • swapTables

        public void swapTables​(Table table)
                        throws SQLException
        Swaps a newly loaded temporary table with the existing primary table.
        Parameters:
        table - The table to swap.
        Throws:
        SQLException - If an error occurs.