jararaca 0.2.32__py3-none-any.whl → 0.2.33__py3-none-any.whl
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.
Potentially problematic release.
This version of jararaca might be problematic. Click here for more details.
- jararaca/persistence/sort_filter.py +24 -17
- {jararaca-0.2.32.dist-info → jararaca-0.2.33.dist-info}/METADATA +1 -1
- {jararaca-0.2.32.dist-info → jararaca-0.2.33.dist-info}/RECORD +7 -7
- pyproject.toml +1 -1
- {jararaca-0.2.32.dist-info → jararaca-0.2.33.dist-info}/LICENSE +0 -0
- {jararaca-0.2.32.dist-info → jararaca-0.2.33.dist-info}/WHEEL +0 -0
- {jararaca-0.2.32.dist-info → jararaca-0.2.33.dist-info}/entry_points.txt +0 -0
|
@@ -138,14 +138,29 @@ class FilterRuleApplier:
|
|
|
138
138
|
case _:
|
|
139
139
|
raise ValueError(f"Unsupported bool operator: {filter.operator}")
|
|
140
140
|
elif field_type is int:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
|
|
142
|
+
if isinstance(filter.value, list):
|
|
143
|
+
match filter.operator:
|
|
144
|
+
case "isAnyOf":
|
|
145
|
+
if not len(filter.value):
|
|
146
|
+
return query
|
|
147
|
+
|
|
148
|
+
number_values = [
|
|
149
|
+
int(v) for v in filter.value if re.match(r"^-?\d+$", v)
|
|
150
|
+
]
|
|
151
|
+
return query.filter(field.in_(number_values))
|
|
152
|
+
case _:
|
|
153
|
+
raise ValueError(
|
|
154
|
+
f"Unsupported int operator: {filter.operator} for list"
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
if not re.match(r"^-?\d+$", filter.value):
|
|
145
158
|
raise ValueError(
|
|
146
|
-
f"
|
|
159
|
+
f"Invalid integer value: {filter.value} for field {field}"
|
|
147
160
|
)
|
|
148
|
-
|
|
161
|
+
|
|
162
|
+
number_value = int(filter.value)
|
|
163
|
+
|
|
149
164
|
match filter.operator:
|
|
150
165
|
case "=":
|
|
151
166
|
return query.filter(field == number_value)
|
|
@@ -163,18 +178,10 @@ class FilterRuleApplier:
|
|
|
163
178
|
return query.filter(field == None) # noqa
|
|
164
179
|
case "isNotEmpty":
|
|
165
180
|
return query.filter(field != None) # noqa
|
|
166
|
-
case "isAnyOf":
|
|
167
|
-
if not isinstance(filter.value, list):
|
|
168
|
-
raise ValueError(
|
|
169
|
-
f"Unsupported value type for isAnyOf operator: {type(filter.value)}"
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
number_values = [
|
|
173
|
-
int(v) for v in filter.value if re.match(r"^-?\d+$", v)
|
|
174
|
-
]
|
|
175
|
-
return query.filter(field.in_(number_values))
|
|
176
181
|
case _:
|
|
177
|
-
raise ValueError(
|
|
182
|
+
raise ValueError(
|
|
183
|
+
f"Unsupported int operator: {filter.operator} for single value"
|
|
184
|
+
)
|
|
178
185
|
|
|
179
186
|
raise ValueError(f"Unsupported field type: {field_type}")
|
|
180
187
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
2
2
|
README.md,sha256=mte30I-ZEJJp-Oax-OganNgl6G9GaCZPL6JVFAvZGz4,7034
|
|
3
|
-
pyproject.toml,sha256=
|
|
3
|
+
pyproject.toml,sha256=7u8GwCmDCwYjr4ihvpwQMrTOAYqTxz3BQ-vwKI4YrHc,1837
|
|
4
4
|
jararaca/__init__.py,sha256=h1lYQMmB8TATPG0GXjIzLZWHbWFhvkAFu-yBjm2W18g,13875
|
|
5
5
|
jararaca/__main__.py,sha256=-O3vsB5lHdqNFjUtoELDF81IYFtR-DSiiFMzRaiSsv4,67
|
|
6
6
|
jararaca/cli.py,sha256=fh7lp7rf5xbV5VaoSYWWehktel6BPcOXMjW7cw4wKms,5693
|
|
@@ -28,7 +28,7 @@ jararaca/persistence/exports.py,sha256=Ghx4yoFaB4QVTb9WxrFYgmcSATXMNvrOvT8ybPNKX
|
|
|
28
28
|
jararaca/persistence/interceptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
jararaca/persistence/interceptors/aiosqa_interceptor.py,sha256=H6ZjOdosYGCZUzKjugiXQwJkAbnsL4HnkZLOEQhULEc,1986
|
|
30
30
|
jararaca/persistence/session.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
jararaca/persistence/sort_filter.py,sha256=
|
|
31
|
+
jararaca/persistence/sort_filter.py,sha256=Kq-5sXw2N1YcK79u9CZ3TvW5PbIxIhcHPF2C7HpYOvQ,9139
|
|
32
32
|
jararaca/persistence/utilities.py,sha256=v9ckhzti3GKWQrng2I03EO-dxGRGp-sLoVnVNf_UFU4,12478
|
|
33
33
|
jararaca/presentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
jararaca/presentation/decorators.py,sha256=eL2YCgMSr19m4YCri5PQU46NRxf0QxsqDnz6MqKu0YQ,8389
|
|
@@ -58,8 +58,8 @@ jararaca/tools/app_config/decorators.py,sha256=-ckkMZ1dswOmECdo1rFrZ15UAku--txaN
|
|
|
58
58
|
jararaca/tools/app_config/interceptor.py,sha256=nfFZiS80hrbnL7-XEYrwmp2rwaVYBqxvqu3Y-6o_ov4,2575
|
|
59
59
|
jararaca/tools/metadata.py,sha256=7nlCDYgItNybentPSSCc2MLqN7IpBd0VyQzfjfQycVI,1402
|
|
60
60
|
jararaca/tools/typescript/interface_parser.py,sha256=_dPBRKs_67eiQ8cPWp8q1uGbIPxZ30dypfoqhbBAL_Y,28790
|
|
61
|
-
jararaca-0.2.
|
|
62
|
-
jararaca-0.2.
|
|
63
|
-
jararaca-0.2.
|
|
64
|
-
jararaca-0.2.
|
|
65
|
-
jararaca-0.2.
|
|
61
|
+
jararaca-0.2.33.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
62
|
+
jararaca-0.2.33.dist-info/METADATA,sha256=vipFRw2OX4abz7Q-1BuwXfF8ouLw0FXn0zHHL21iXo8,8552
|
|
63
|
+
jararaca-0.2.33.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
64
|
+
jararaca-0.2.33.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
|
|
65
|
+
jararaca-0.2.33.dist-info/RECORD,,
|
pyproject.toml
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|