diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java index 8d7317609997..1084ebf4bc78 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java @@ -1885,8 +1885,7 @@ default int listCount(ListFilter filter) { "%s WHERE entity_relationship.fromEntity = :serviceType and entity_relationship.relation = :relation", condition); bindMap.put("relation", CONTAINS.ordinal()); - bindMap.put("serviceType", serviceType); - return listIngestionPipelineCount(condition, bindMap); + return listIngestionPipelineCount(condition, bindMap, filter.getQueryParams()); } return EntityDAO.super.listCount(filter); } @@ -1922,11 +1921,10 @@ default List listAfter(ListFilter filter, int limit, String after) { "%s WHERE entity_relationship.fromEntity = :serviceType and entity_relationship.relation = :relation and ingestion_pipeline_entity.name > :after order by ingestion_pipeline_entity.name ASC LIMIT :limit", condition); - bindMap.put("serviceType", serviceType); bindMap.put("relation", CONTAINS.ordinal()); bindMap.put("after", after); bindMap.put("limit", limit); - return listAfterIngestionPipelineByserviceType(condition, bindMap); + return listAfterIngestionPipelineByserviceType(condition, bindMap, filter.getQueryParams()); } return EntityDAO.super.listAfter(filter, limit, after); } @@ -1961,27 +1959,33 @@ default List listBefore(ListFilter filter, int limit, String before) { "%s WHERE entity_relationship.fromEntity = :serviceType and entity_relationship.relation = :relation and ingestion_pipeline_entity.name < :before order by ingestion_pipeline_entity.name DESC LIMIT :limit", condition); - bindMap.put("serviceType", serviceType); bindMap.put("relation", CONTAINS.ordinal()); bindMap.put("before", before); bindMap.put("limit", limit); - return listBeforeIngestionPipelineByserviceType(condition, bindMap); + return listBeforeIngestionPipelineByserviceType( + condition, bindMap, filter.getQueryParams()); } return EntityDAO.super.listBefore(filter, limit, before); } @SqlQuery("SELECT ingestion_pipeline_entity.json FROM ingestion_pipeline_entity ") List listAfterIngestionPipelineByserviceType( - @Define("cond") String cond, @BindMap Map bindings); + @Define("cond") String cond, + @BindMap Map bindings, + @BindMap Map params); @SqlQuery( "SELECT json FROM (SELECT ingestion_pipeline_entity.name, ingestion_pipeline_entity.json FROM ingestion_pipeline_entity ) last_rows_subquery ORDER BY last_rows_subquery.name") List listBeforeIngestionPipelineByserviceType( - @Define("cond") String cond, @BindMap Map bindings); + @Define("cond") String cond, + @BindMap Map bindings, + @BindMap Map params); @SqlQuery("SELECT count(*) FROM ingestion_pipeline_entity ") int listIngestionPipelineCount( - @Define("cond") String cond, @BindMap Map bindings); + @Define("cond") String cond, + @BindMap Map bindings, + @BindMap Map params); } interface PipelineServiceDAO extends EntityDAO {