oplnk-python-utils 1.1.2__tar.gz → 1.1.3__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.
- {oplnk_python_utils-1.1.2/oplnk_python_utils.egg-info → oplnk_python_utils-1.1.3}/PKG-INFO +1 -1
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/__init__.py +1 -1
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/query/query_builder.py +18 -2
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3/oplnk_python_utils.egg-info}/PKG-INFO +1 -1
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/setup.py +1 -1
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/LICENSE +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/MANIFEST.in +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/README.md +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/cache/__init__.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/cache/cache_utils.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/__init__.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/data.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/parsing.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/serialization.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/query/__init__.py +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/SOURCES.txt +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/dependency_links.txt +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/not-zip-safe +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/requires.txt +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/top_level.txt +0 -0
- {oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/setup.cfg +0 -0
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/query/query_builder.py
RENAMED
|
@@ -621,8 +621,24 @@ class QueryBuilder:
|
|
|
621
621
|
try:
|
|
622
622
|
# Use utility function to build proper aggregation expression
|
|
623
623
|
field_expression = build_aggregation_field_expression(field)
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
|
|
625
|
+
# Create nested structure for fields with dot notation
|
|
626
|
+
parts = field.split(".")
|
|
627
|
+
d = group_id
|
|
628
|
+
for i, part in enumerate(parts[:-1]):
|
|
629
|
+
# If a non-dict value is at the path, it can't be extended
|
|
630
|
+
if part in d and not isinstance(d[part], dict):
|
|
631
|
+
# To avoid overwriting, you could add a unique suffix, or handle as an error
|
|
632
|
+
# For now, let's just print a warning and continue
|
|
633
|
+
print(
|
|
634
|
+
f"Warning: conflicting path in distinct fields for '{field}' at part '{part}'."
|
|
635
|
+
)
|
|
636
|
+
d = d.setdefault(f"{part}_{i}", {})
|
|
637
|
+
else:
|
|
638
|
+
d = d.setdefault(part, {})
|
|
639
|
+
|
|
640
|
+
d[parts[-1]] = field_expression
|
|
641
|
+
|
|
626
642
|
except ValueError as e:
|
|
627
643
|
# Log error and skip invalid field
|
|
628
644
|
print(f"Warning: Skipping invalid field '{field}' in distinct: {e}")
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="oplnk-python-utils",
|
|
5
|
-
version="1.1.
|
|
5
|
+
version="1.1.3",
|
|
6
6
|
author="OpenLink SpA",
|
|
7
7
|
author_email="contacto@openlink.cl",
|
|
8
8
|
description="Reusable utilities for caching, data manipulation, parsing, and MongoDB query building",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/cache/cache_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils/core/serialization.py
RENAMED
|
File without changes
|
|
File without changes
|
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/requires.txt
RENAMED
|
File without changes
|
{oplnk_python_utils-1.1.2 → oplnk_python_utils-1.1.3}/oplnk_python_utils.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|