ramifice 0.8.40__py3-none-any.whl → 0.8.42__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.
- ramifice/commons/general.py +5 -5
- ramifice/commons/many.py +1 -1
- ramifice/commons/one.py +3 -3
- {ramifice-0.8.40.dist-info → ramifice-0.8.42.dist-info}/METADATA +2 -2
- {ramifice-0.8.40.dist-info → ramifice-0.8.42.dist-info}/RECORD +7 -7
- {ramifice-0.8.40.dist-info → ramifice-0.8.42.dist-info}/WHEEL +0 -0
- {ramifice-0.8.40.dist-info → ramifice-0.8.42.dist-info}/licenses/LICENSE +0 -0
ramifice/commons/general.py
CHANGED
@@ -43,7 +43,7 @@ class GeneralMixin:
|
|
43
43
|
comment: Any | None = None,
|
44
44
|
**kwargs,
|
45
45
|
) -> int:
|
46
|
-
"""
|
46
|
+
"""Get an estimate of the number of documents in this collection using collection metadata."""
|
47
47
|
# Get collection for current model.
|
48
48
|
collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
|
49
49
|
#
|
@@ -60,7 +60,7 @@ class GeneralMixin:
|
|
60
60
|
comment: Any | None = None,
|
61
61
|
**kwargs,
|
62
62
|
) -> int:
|
63
|
-
"""
|
63
|
+
"""Count the number of documents in this collection."""
|
64
64
|
# Get collection for current model.
|
65
65
|
collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
|
66
66
|
# Correcting filter.
|
@@ -83,7 +83,7 @@ class GeneralMixin:
|
|
83
83
|
comment: Any | None = None,
|
84
84
|
**kwargs,
|
85
85
|
) -> AsyncCommandCursor:
|
86
|
-
"""
|
86
|
+
"""Perform an aggregation using the aggregation framework on this collection."""
|
87
87
|
# Get collection for current model.
|
88
88
|
collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
|
89
89
|
# Correcting filter.
|
@@ -108,7 +108,7 @@ class GeneralMixin:
|
|
108
108
|
hint: Any | None = None,
|
109
109
|
**kwargs,
|
110
110
|
) -> list[Any]:
|
111
|
-
"""
|
111
|
+
"""Get a list of distinct values for key among all documents in this collection.
|
112
112
|
|
113
113
|
Returns an array of unique values for specified field of collection.
|
114
114
|
"""
|
@@ -129,7 +129,7 @@ class GeneralMixin:
|
|
129
129
|
|
130
130
|
@classmethod
|
131
131
|
def collection_name(cls) -> str:
|
132
|
-
"""
|
132
|
+
"""The name of this AsyncCollection."""
|
133
133
|
# Get collection for current model.
|
134
134
|
collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
|
135
135
|
#
|
ramifice/commons/many.py
CHANGED
@@ -240,7 +240,7 @@ class ManyMixin:
|
|
240
240
|
let: Any | None = None,
|
241
241
|
comment: Any | None = None,
|
242
242
|
) -> DeleteResult:
|
243
|
-
"""
|
243
|
+
"""Delete one or more documents matching the filter."""
|
244
244
|
# Raises a panic if the Model cannot be removed.
|
245
245
|
if not cls.META["is_delete_doc"]:
|
246
246
|
msg = (
|
ramifice/commons/one.py
CHANGED
@@ -31,7 +31,7 @@ class OneMixin:
|
|
31
31
|
*args: tuple,
|
32
32
|
**kwargs: dict[str, Any],
|
33
33
|
) -> dict[str, Any] | None:
|
34
|
-
"""
|
34
|
+
"""Get a single document from the database."""
|
35
35
|
# Get collection for current model.
|
36
36
|
collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
|
37
37
|
# Correcting filter.
|
@@ -124,7 +124,7 @@ class OneMixin:
|
|
124
124
|
let: Any | None = None,
|
125
125
|
comment: Any | None = None,
|
126
126
|
) -> DeleteResult:
|
127
|
-
"""
|
127
|
+
"""Delete a single document matching the filter."""
|
128
128
|
# Raises a panic if the Model cannot be removed.
|
129
129
|
if not cls.META["is_delete_doc"]:
|
130
130
|
msg = (
|
@@ -162,7 +162,7 @@ class OneMixin:
|
|
162
162
|
comment: Any | None = None,
|
163
163
|
**kwargs: dict[str, Any],
|
164
164
|
) -> dict[str, Any] | None:
|
165
|
-
"""
|
165
|
+
"""Finds a single document and deletes it, returning the document."""
|
166
166
|
# Raises a panic if the Model cannot be removed.
|
167
167
|
if not cls.META["is_delete_doc"]:
|
168
168
|
msg = (
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ramifice
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.42
|
4
4
|
Summary: ORM-pseudo-like API MongoDB for Python language.
|
5
5
|
Project-URL: Homepage, https://github.com/kebasyaty/ramifice
|
6
6
|
Project-URL: Documentation, https://kebasyaty.github.io/ramifice/
|
@@ -286,7 +286,7 @@ if __name__ == "__main__":
|
|
286
286
|
<tr>
|
287
287
|
<td align="left">db_query_docs_limit</td>
|
288
288
|
<td align="left">1000</td>
|
289
|
-
<td align="left">
|
289
|
+
<td align="left">Limiting the number of request results.</td>
|
290
290
|
</tr>
|
291
291
|
<tr>
|
292
292
|
<td align="left">is_create_doc</td>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
ramifice/__init__.py,sha256=Ms9drE4wSvoUyzAtAa-VRykD7ufz6L_GtHx-YQRePDI,1619
|
2
2
|
ramifice/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
ramifice/commons/__init__.py,sha256=RR_cVDF0H8xa56q2PXGKUSmYOPF-AUNKRY9u7DHD_KU,583
|
4
|
-
ramifice/commons/general.py,sha256=
|
4
|
+
ramifice/commons/general.py,sha256=yPRG8c2s5C7-J2L4Ev_pa0QA0TWdVrCoD15MuKU5DtY,5488
|
5
5
|
ramifice/commons/indexes.py,sha256=Y8v1L3_upl771pJG7mQkSJNwP6slGEakVvj2fZ4zloE,3655
|
6
|
-
ramifice/commons/many.py,sha256=
|
7
|
-
ramifice/commons/one.py,sha256=
|
6
|
+
ramifice/commons/many.py,sha256=F1OxAuwmswHTFRUZAvRQO3w4Ih31E3W6FMts07w9OtI,9430
|
7
|
+
ramifice/commons/one.py,sha256=b-nIVDCCZhH58z3Fbqrz7r8cf8fEAvV9ZycSLLR2Gpk,7027
|
8
8
|
ramifice/commons/tools.py,sha256=MCTPtOl14sIUBkp51f-nqTFVsD0iUj51G40rEFSzU20,2477
|
9
9
|
ramifice/commons/unit_manager.py,sha256=V9i3O-Z3eZKVpMUv2a_8FV0VBeHpJZWqeLRGJmtAEsg,4983
|
10
10
|
ramifice/fields/__init__.py,sha256=e1TlGRLYMo-97CNUona6EFR0svR--Wp77d_LsYhaBoo,2398
|
@@ -77,7 +77,7 @@ ramifice/utils/mixins.py,sha256=5G3x8hK3igM7JBgCiCnVDdb_0K_D1gV1tw0QKpDlm-A,1161
|
|
77
77
|
ramifice/utils/tools.py,sha256=WOazw24pvL96-0yNBy7YRGErN3vAQ4F6GS9TLvWFqrs,2747
|
78
78
|
ramifice/utils/translations.py,sha256=YItvCWv-13FS2x8VYsAOH-Nx_qQOitOX7-bRGX3mc3A,4718
|
79
79
|
ramifice/utils/unit.py,sha256=zHfvkyEU4sxHOc-QMuntEcvyfQqH75AK1zx8E25kM9Y,2535
|
80
|
-
ramifice-0.8.
|
81
|
-
ramifice-0.8.
|
82
|
-
ramifice-0.8.
|
83
|
-
ramifice-0.8.
|
80
|
+
ramifice-0.8.42.dist-info/METADATA,sha256=A3eFjc5MeNxDWEkNp7eilVtGiKFVNop0qyNp6T1MmQ0,18899
|
81
|
+
ramifice-0.8.42.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
82
|
+
ramifice-0.8.42.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
|
83
|
+
ramifice-0.8.42.dist-info/RECORD,,
|
File without changes
|
File without changes
|