class JdbcDataExporter implements DataExporter {

    @Override
    public void export(final StoreLoader loader,
                       final Path output,
                       final String username,
                       final String password) throws SQLException, IOException {

        try (Connection conn = DriverManager.getConnection(jdbcUrl, username, password)) {

            try (Statement stmt = conn.createStatement()) {
                for (final String createTable : createTables) {
                    stmt.executeUpdate(createTable);
                }
            }

            try (PreparedStatement insertStatement = conn.prepareStatement(insertRow)) {
                DataEntry next;
                while ((next = loader.nextEntry()) != null) {
                    try (InputStream data = next.getValue()) {
                        insertStatement.setBytes(1, next.getKey());
                        insertStatement.setBinaryStream(2, data);
                        insertStatement.execute();
                    }
                }
            }

        }
    }

    public  JdbcDataExporter(final String jdbcUrl, final String insertRow, final List<String> createTables);

}