postgresdb3 1.0.3__tar.gz → 1.0.4__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-1.0.3 → postgresdb3-1.0.4}/PKG-INFO +1 -1
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/query.py +10 -2
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3.egg-info/PKG-INFO +1 -1
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/setup.py +1 -1
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/README.md +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/__init__.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/cli.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/core/__init__.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/core/async_db.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/core/sync_db.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/migrations/__init__.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/migrations/engine.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/__init__.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/base.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/expressions.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/__init__.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/base.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/datetime.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/foreign.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/misc.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/numeric.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/fields/text.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/meta.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/models.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3/orm/relations.py +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3.egg-info/SOURCES.txt +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3.egg-info/dependency_links.txt +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3.egg-info/requires.txt +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/postgresdb3.egg-info/top_level.txt +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/pyproject.toml +0 -0
- {postgresdb3-1.0.3 → postgresdb3-1.0.4}/setup.cfg +0 -0
|
@@ -80,7 +80,11 @@ class QuerySet:
|
|
|
80
80
|
for field_name in fields:
|
|
81
81
|
field = self.model._fields.get(field_name)
|
|
82
82
|
if not field or not hasattr(field, "to"):
|
|
83
|
-
raise ValueError(f"{field_name} ForeignKey
|
|
83
|
+
raise ValueError(f"'{field_name}' xato kiritildi. select_related faqat ForeignKey yoki OneToOneField bilan ishlaydi.")
|
|
84
|
+
|
|
85
|
+
from .fields.foreign import ManyToManyField
|
|
86
|
+
if isinstance(field, ManyToManyField):
|
|
87
|
+
raise TypeError(f"'{field_name}' bu ManyToManyField! Uning uchun select_related() emas, balki prefetch_related() ishlating.")
|
|
84
88
|
|
|
85
89
|
related_table = field.to.table
|
|
86
90
|
on_condition = f"{self.model.table}.{field_name} = {related_table}.{field.to.get_pk_name()}"
|
|
@@ -486,7 +490,11 @@ class AsyncQuerySet:
|
|
|
486
490
|
for field_name in fields:
|
|
487
491
|
field = self.model._fields.get(field_name)
|
|
488
492
|
if not field or not hasattr(field, "to"):
|
|
489
|
-
raise ValueError(f"{field_name} ForeignKey
|
|
493
|
+
raise ValueError(f"'{field_name}' xato kiritildi. select_related faqat ForeignKey yoki OneToOneField bilan ishlaydi.")
|
|
494
|
+
|
|
495
|
+
from .fields.foreign import ManyToManyField
|
|
496
|
+
if isinstance(field, ManyToManyField):
|
|
497
|
+
raise TypeError(f"'{field_name}' bu ManyToManyField! Uning uchun select_related() emas, balki prefetch_related() ishlating.")
|
|
490
498
|
|
|
491
499
|
related_table = field.to.table
|
|
492
500
|
on_condition = f"{self.model.table}.{field_name} = {related_table}.{field.to.get_pk_name()}"
|
|
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
|