postgresdb3 2.0.1__tar.gz → 2.0.2__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.
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/PKG-INFO +1 -1
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/models.py +8 -4
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3.egg-info/PKG-INFO +1 -1
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/setup.py +1 -1
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/README.md +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/__init__.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/cli.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/core/__init__.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/core/async_db.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/core/sync_db.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/migrations/__init__.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/migrations/engine.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/__init__.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/base.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/expressions.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/__init__.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/base.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/datetime.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/foreign.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/misc.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/numeric.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/fields/text.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/meta.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/query.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3/orm/relations.py +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3.egg-info/SOURCES.txt +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3.egg-info/dependency_links.txt +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3.egg-info/requires.txt +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/postgresdb3.egg-info/top_level.txt +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/pyproject.toml +0 -0
- {postgresdb3-2.0.1 → postgresdb3-2.0.2}/setup.cfg +0 -0
|
@@ -240,8 +240,10 @@ class Model(BaseModel, metaclass=ModelMeta):
|
|
|
240
240
|
if key == pk_name:
|
|
241
241
|
raise ValueError(f"{pk_name} ustunini yangilab bo'lmaydi")
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
if not isinstance(value, __import__("postgresdb3.orm.expressions", fromlist=["FExpression"]).FExpression):
|
|
244
|
+
setattr(self, key, value)
|
|
245
|
+
|
|
246
|
+
self.__class__.db.update_fields(self.__class__.table, kwargs, pk_name, pk_value)
|
|
245
247
|
|
|
246
248
|
return self
|
|
247
249
|
|
|
@@ -497,8 +499,10 @@ class AsyncModel(BaseModel, metaclass=ModelMeta):
|
|
|
497
499
|
if key == pk_name:
|
|
498
500
|
raise ValueError(f"{pk_name} ustunini yangilab bo'lmaydi")
|
|
499
501
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
if not isinstance(value, __import__("postgresdb3.orm.expressions", fromlist=["FExpression"]).FExpression):
|
|
503
|
+
setattr(self, key, value)
|
|
504
|
+
|
|
505
|
+
await self.__class__.db.update_fields(self.__class__.table, kwargs, pk_name, pk_value)
|
|
502
506
|
|
|
503
507
|
return self
|
|
504
508
|
|
|
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
|
|
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
|