shubhamraj-git commented on code in PR #44516:
URL: https://github.com/apache/airflow/pull/44516#discussion_r1876354458


##########
airflow/api_fastapi/common/parameters.py:
##########
@@ -146,6 +147,127 @@ def depends_search(value: str | None = 
Query(alias=pattern_name, default=None))
     return depends_search
 
 
+class SearchPatternEnum(Enum):
+    """
+    Enum representing the types of search patterns supported.
+
+    - STARTS_WITH: Matches strings starting with the given value.
+    - ENDS_WITH: Matches strings ending with the given value.
+    - CONTAINS: Matches strings containing the given value.
+    - EQUALS: Matches strings exactly equal to the given value.
+    - NOT_STARTS_WITH: Excludes strings starting with the given value.
+    - NOT_ENDS_WITH: Excludes strings ending with the given value.
+    - NOT_CONTAINS: Excludes strings containing the given value.
+    """
+
+    STARTS_WITH = "starts_with"
+    ENDS_WITH = "ends_with"
+    CONTAINS = "contains"
+    EQUALS = "equals"
+    NOT_STARTS_WITH = "not_starts_with"
+    NOT_ENDS_WITH = "not_ends_with"
+    NOT_CONTAINS = "not_contains"

Review Comment:
   we can have a dropdown and multiple lines of search can be given from user 
with add and delete functionality for each search options.
   Similar behaviour from legacy UI
   
   ```
   const filters = [
       { key: "STARTS_WITH", label: "Starts With", value: "starts_with" },
       { key: "ENDS_WITH", label: "Ends With", value: "ends_with" },
       { key: "CONTAINS", label: "Contains", value: "contains" },
       { key: "EQUALS", label: "Equals", value: "equals" },
       { key: "NOT_STARTS_WITH", label: "Does Not Start With", value: 
"not_starts_with" },
       { key: "NOT_ENDS_WITH", label: "Does Not End With", value: 
"not_ends_with" },
       { key: "NOT_CONTAINS", label: "Does Not Contain", value: "not_contains" }
   ];
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to