class DBSupport {

    public static void createIndex(List<SearchIndexValue> indexValues, String dbFileDir) throws BuilderException {

        final String dbFile = concat(dbFileDir, DB_FILE);
        // Create DB file
        try (final Connection connection = DriverManager.getConnection("jdbc:sqlite:" + dbFile);
             final Statement stmt = connection.createStatement()){
            stmt.execute(CREATE_INDEX_SQL);
            // Update DB
            try (final PreparedStatement pst = connection.prepareStatement(INSERT_INDEX_SQL)) {
                for (final SearchIndexValue value : indexValues) {
                    pst.setString(1, value.getName());
                    pst.setString(2, value.getType().getTypeName());
                    pst.setString(3, value.getPath());
                    pst.execute();
                }
            }
        } catch (SQLException e) {
            throw new BuilderException("Error writing to SQLite DB", e);
        }
        logVerbose("Created the SQLite search index");
    }

    private  DBSupport();

}