Skip to content

Commit 1e5ae3d

Browse files
authored
Add support for operator in apply item
1 parent 8a4c92a commit 1e5ae3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mui/v6/integrations/sqlalchemy/filter/apply_items.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
apply_basic_operator,
1414
apply_before_operator,
1515
apply_contains_operator,
16+
apply_does_not_contain_operator,
1617
apply_endswith_operator,
1718
apply_is_any_of_operator,
1819
apply_is_empty_operator,
@@ -93,6 +94,7 @@ def apply_operator_to_column(
9394
* isNotEmpty (`IS NOT NULL` clause)
9495
* isAnyOf (`IN [?, ?, ?]` clause)
9596
* contains (`'%' || ? || '%'` clause)
97+
* doesNotContain (`NOT '%' || ? || '%'` clause)
9698
* startsWith (`? || '%'` clause)
9799
* endsWith (`'%' || ?` clause)
98100
@@ -118,6 +120,8 @@ def apply_operator_to_column(
118120
return apply_is_any_of_operator(column, item.value)
119121
elif item.operator == "contains":
120122
return apply_contains_operator(column, item.value)
123+
elif item.operator == "doesNotContain":
124+
return apply_does_not_contain_operator(column, item.value)
121125
elif item.operator == "startsWith":
122126
return apply_startswith_operator(column, item.value)
123127
elif item.operator == "endsWith":

0 commit comments

Comments
 (0)