elody 0.0.177__py3-none-any.whl → 0.0.178__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.
- elody/object_configurations/base_object_configuration.py +10 -5
- {elody-0.0.177.dist-info → elody-0.0.178.dist-info}/METADATA +1 -1
- {elody-0.0.177.dist-info → elody-0.0.178.dist-info}/RECORD +6 -6
- {elody-0.0.177.dist-info → elody-0.0.178.dist-info}/LICENSE +0 -0
- {elody-0.0.177.dist-info → elody-0.0.178.dist-info}/WHEEL +0 -0
- {elody-0.0.177.dist-info → elody-0.0.178.dist-info}/top_level.txt +0 -0
|
@@ -17,8 +17,8 @@ class BaseObjectConfiguration(ABC):
|
|
|
17
17
|
overwrite=overwrite,
|
|
18
18
|
**kwargs,
|
|
19
19
|
),
|
|
20
|
-
"nested_matcher_builder": lambda object_lists, keys_info, value: self.__build_nested_matcher(
|
|
21
|
-
object_lists, keys_info, value
|
|
20
|
+
"nested_matcher_builder": lambda object_lists, keys_info, value, **kwargs: self.__build_nested_matcher(
|
|
21
|
+
object_lists, keys_info, value, **kwargs
|
|
22
22
|
),
|
|
23
23
|
"post_crud_hook": lambda **kwargs: None,
|
|
24
24
|
"pre_crud_hook": lambda *, document, **kwargs: document,
|
|
@@ -142,11 +142,16 @@ class BaseObjectConfiguration(ABC):
|
|
|
142
142
|
sort_keys(document)
|
|
143
143
|
return document
|
|
144
144
|
|
|
145
|
-
def __build_nested_matcher(
|
|
145
|
+
def __build_nested_matcher(
|
|
146
|
+
self, object_lists, keys_info, value, *, index=0, **kwargs
|
|
147
|
+
):
|
|
146
148
|
if index == 0 and not any(info["object_list"] for info in keys_info):
|
|
147
149
|
if value in ["ANY_MATCH", "NONE_MATCH"]:
|
|
148
150
|
value = {"$exists": value == "ANY_MATCH"}
|
|
149
|
-
|
|
151
|
+
matcher = {".".join(info["key"] for info in keys_info): value}
|
|
152
|
+
if inner_exact_matches := kwargs.get("inner_exact_matches"):
|
|
153
|
+
matcher.update(inner_exact_matches)
|
|
154
|
+
return matcher
|
|
150
155
|
|
|
151
156
|
info = keys_info[index]
|
|
152
157
|
|
|
@@ -155,7 +160,7 @@ class BaseObjectConfiguration(ABC):
|
|
|
155
160
|
"$elemMatch": {
|
|
156
161
|
object_lists[info["object_list"]]: info["object_key"],
|
|
157
162
|
**self.__build_nested_matcher(
|
|
158
|
-
object_lists, keys_info[index + 1 :], value, 0
|
|
163
|
+
object_lists, keys_info[index + 1 :], value, index=0, **kwargs
|
|
159
164
|
),
|
|
160
165
|
}
|
|
161
166
|
}
|
|
@@ -12,7 +12,7 @@ elody/validator.py,sha256=G7Ya538EJHCFzOxEri2OcFMabfLBCtTKxuf4os_KuNw,260
|
|
|
12
12
|
elody/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
elody/migration/base_object_migrator.py,sha256=n8uvgGfjEUy60G47RD7Y-oxp1vHLOauwPMDl87LcxtU,436
|
|
14
14
|
elody/object_configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
elody/object_configurations/base_object_configuration.py,sha256=
|
|
15
|
+
elody/object_configurations/base_object_configuration.py,sha256=dXhzQLWtIEQHx3WSPs2R-dvN3ulcPA27G3oNGAsImBQ,6756
|
|
16
16
|
elody/object_configurations/elody_configuration.py,sha256=uoTYN0lzWh3Z0uN4k-o-SbRnt9YrA9AkUnIi80LWcGI,5428
|
|
17
17
|
elody/object_configurations/job_configuration.py,sha256=simi4TBiZ5cQePlzFHAd-C-khViWN9VUbAOKq9FYwk8,2057
|
|
18
18
|
elody/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -40,8 +40,8 @@ tests/data.py,sha256=Q3oxduf-E3m-Z5G_p3fcs8jVy6g10I7zXKL1m94UVMI,2906
|
|
|
40
40
|
tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
tests/unit/test_csv.py,sha256=NQaOhehfQ4GuXku0Y1SA8DYjJeqqidbF50zEHAi8RZA,15923
|
|
42
42
|
tests/unit/test_utils.py,sha256=g63szcEZyHhCOtrW4BnNbcgVca3oYPIOLjBdIzNwwN0,8784
|
|
43
|
-
elody-0.0.
|
|
44
|
-
elody-0.0.
|
|
45
|
-
elody-0.0.
|
|
46
|
-
elody-0.0.
|
|
47
|
-
elody-0.0.
|
|
43
|
+
elody-0.0.178.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
44
|
+
elody-0.0.178.dist-info/METADATA,sha256=9u2Crpz6sHIdXS1gTUH7Kplq6H7Ov-7LDPFgAkcOjV4,23336
|
|
45
|
+
elody-0.0.178.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
46
|
+
elody-0.0.178.dist-info/top_level.txt,sha256=E0mImupLj0KmtUUCXRYEoLDRaSkuiGaOIIseAa0oQ-M,21
|
|
47
|
+
elody-0.0.178.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|