ephraimbuddy commented on code in PR #43783:
URL: https://github.com/apache/airflow/pull/43783#discussion_r1834525748


##########
airflow/api_fastapi/common/parameters.py:
##########
@@ -406,6 +407,37 @@ def depends(self, dag_id: str | None = None) -> 
_DagIdFilter:
         return self.set_value(dag_id)
 
 
+class _UriPatternSearch(_SearchParam):
+    """Search on uri."""
+
+    def __init__(self, skip_none: bool = True) -> None:
+        super().__init__(AssetModel.uri, skip_none)
+
+    def depends(self, uri_pattern: str | None = None) -> _UriPatternSearch:
+        return self.set_value(uri_pattern)
+
+
+class _DagIdAssetReferencePatternSearch(_SearchParam):
+    """Search on dag_id."""
+
+    def __init__(self, skip_none: bool = True) -> None:
+        super().__init__(AssetModel.consuming_dags, skip_none)
+        self.task_attribute = AssetModel.producing_tasks
+
+    def depends(self, dag_ids: str | None = None) -> 
_DagIdAssetReferencePatternSearch:
+        return self.set_value(dag_ids)
+
+    def to_orm(self, select: Select) -> Select:
+        if self.value is None and self.skip_none:
+            return select
+        if self.value is not None:
+            dags_list = self.value.split(",")
+        return select.filter(

Review Comment:
   Since we are using sqlalchemy 2 `select`, we should use `where`. Query and 
Select use different syntaxes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to