private void delete(Connection conn, ResultSet oldRow, ResultSet ignored) throws SQLException {
        String apiOrgId = oldRow.getString("api_org_id");
        String apiId = oldRow.getString("api_id");
        String apiVersion = oldRow.getString("version");

        Jdbi.create(conn).withHandle(h -> h.createUpdate(
                        "DELETE FROM discoverability d "
                                + "WHERE d.api_id = :apiId "
                                + "AND d.org_id = :orgId "
                                + "AND d.api_version = :apiVersion "))
                .bind("orgId", apiOrgId)
                .bind("apiId", apiId)
                .bind("apiVersion", apiVersion)
                .execute();
    }
Synchronize DiscoverabilityEntity materialized view when any public ApiVersion that has a DiscoverabilityLevel is inserted, updated, or deleted.

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/h2/ApiVersionDiscoverabilityTrigger.java