ransacklib 1.1.0.dev13__tar.gz → 1.1.0.dev14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ransacklib-1.1.0.dev13/ransacklib.egg-info → ransacklib-1.1.0.dev14}/PKG-INFO +1 -1
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/pyproject.toml +1 -1
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/function.py +4 -1
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/operator.py +1 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14/ransacklib.egg-info}/PKG-INFO +1 -1
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/LICENSE +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/README.rst +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/__init__.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/exceptions.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/parser.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/py.typed +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/transformer.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransack/types.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransacklib.egg-info/SOURCES.txt +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransacklib.egg-info/dependency_links.txt +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransacklib.egg-info/requires.txt +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/ransacklib.egg-info/top_level.txt +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/setup.cfg +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/tests/test_operator.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/tests/test_parser.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/tests/test_postgres.py +0 -0
- {ransacklib-1.1.0.dev13 → ransacklib-1.1.0.dev14}/tests/test_transformer.py +0 -0
|
@@ -17,12 +17,15 @@ Example usage in query:
|
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
import datetime
|
|
20
|
+
from collections.abc import MutableSequence
|
|
20
21
|
|
|
21
22
|
from ipranges import IP4, IP6, IP4Net, IP4Range, IP6Net, IP6Range
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def length(x):
|
|
25
|
-
if isinstance(
|
|
26
|
+
if isinstance(
|
|
27
|
+
x, (MutableSequence, str, IP4, IP4Net, IP4Range, IP6, IP6Net, IP6Range)
|
|
28
|
+
):
|
|
26
29
|
return len(x)
|
|
27
30
|
raise TypeError(f"Function length is not defined for value {x}")
|
|
28
31
|
|
|
@@ -635,6 +635,7 @@ def _operator_map_sql(op, l_sql, r_sql, t1, t2) -> tuple[str, typing.Any, bool]:
|
|
|
635
635
|
(String, List(String)): (f"{l_sql} = ANY({r_sql})", False),
|
|
636
636
|
(IP, IP): (f"{l_sql} && {r_sql}", False),
|
|
637
637
|
(IP, List(IP)): (f"{l_sql} && ANY({r_sql})", False),
|
|
638
|
+
(List(IP), IP): (f"{r_sql} && ANY({l_sql})", True),
|
|
638
639
|
(List(Any), List(Any)): (f"{l_sql} && {r_sql}", False),
|
|
639
640
|
(Range(Any), Range(Any)): (f"{l_sql} && {r_sql}", False),
|
|
640
641
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|