Releases: dymmond/edgy
Releases · dymmond/edgy
Release list
Version 0.36.1
Version 0.36.0
Added
- Support for unconstraint numeric mode of postgresql for
DecimalField. - Add the
bulk_update_or_createoperation to querysets. - Add the
update_embed_parentoperation to querysets. - Add the
ignore_conflictsparameter tobulk_create. - Add relationship signals (
pre/post_relation_addandpre/post_relation_remove). - Add bulk signals (
pre/post_bulk). - Add
SkipOperationexception for signals. - Add
injected_filtersparameter forpre_deleteto dynamically inject protection rules. - Allow lazy references for
ForeignKeyandManyToMany. This is useful for libraries. - Add dirty tracking.
Changed
DecimalFieldsupports now alsoNonefordecimal_placesandmax_digits.
It emits anUserWarningand falls back toNonefor each of both parameters not provided.bulk_get_or_createmirrors nowget_or_createand returns a list with(instance, created)tuples. The returned instances are not always complete.CombinedQuerySetis moved fromedgy.core.db.queryset.mixins.combinedtoedgy.core.db.queryset.combined. It is not a mixin.- The bulk operations are moved to a mixin.
- The typings changed for QuerySet: it is now a
Generic. - The typings changed for QuerySetType:
EdgyEmbedTargetandEdgyModel(the queryset model) are switched in theGenericdefinition. - Bulk operations are now keywords only (except the first
objsparameter). - Dedupe
bulk_create,bulk_get_or_create, andbulk_update_or_createinputs. - Refactor
QueryExecutorso it can update itself. real_save,raw_deleteanddeleteare now keyword only to prevent bad overwrites.- Remove the
skip_post_delete_hooksparameter fromdeleteas it is for internal use and shouldn't be exposed. - (Internal detail only) bypass the overwritten
__getattr__,__getattribute__and__setattr__for speed improvements.
Fixed
- Relations did not use the tenancy/used schema properly when querying.
- Bulk operations with reflected fields did not always work properly.
run_concurrentlynow properly cleans up not executed coroutines in case of an error.SuspiciousFileOperationinherits now correctly fromEdgyException.- Return row count for update.
- Fix
get_created_time,get_modified_timeandget_accessed_timeon filesystem storage. Previously it used a non-existing setting and didn't follow the specs. - Comparing reflected models.
- Directly issuing queries on
throughmodels ofManyToMany.
Version 0.35.11
Fixed
- Improved typings for QuerySet.
bulk_get_or_createsupports now officially also other types than lists and is exposed inQuerySetType.- Update
.gitignore.
Version 0.35.10
Added
- Add explicit SQLAlchemy compatibility mode via
SQLAlchemyModelMixinfor opted-in models.
This enables SQLAlchemy Core expressions such asselect(Model.id).where(Model.id == value). - Add foreign key scalar alias support in compatibility mode (for example
Model.owner_id). - Compatibility mode can be declared once on an abstract base model and inherited by concrete models.
Fixed
- Preserve existing Edgy query behavior for non-opted-in models and relationship handling.
Version 0.35.9
Fixed
- Missing
table_prefixwhenManyToManyis declared.
Version 0.35.8
Added
- where, select, select or none
and insert as idiomatic alternatives tofilter,get,get_or_noneandcreate. table_prefixis now allowed in the Meta of models. This allows to prefix tables and inherit any prefix to related models.
This is useful for multi-tenancy and sharding.
Fixed
- Contrib parsing of UUID was not working correctly.
- CSS of Edit of a model.
Version 0.35.7
Changed
- Fix internal typing search for SQLAlchemy.
Version 0.35.6
Changed
- Fix queryset bulk calls with empty iterable.
- Rename to esmerald references to ravyn.
- Update import references.
Version 0.35.5
Fixed
- Resolved duplicate row issues when combining
Qexpressions with|(global OR).
Edgy now correctly collapses duplicates at hydration level for non-embedded querysets. .count()now returns the correct number of logical rows when OR or join-fan-out is present
(usesCOUNT(DISTINCT pk)automatically when required).- Fixed incorrect behaviour where OR clauses polluted
.exists()uniqueness checks. - Ensured
select_related()does not introduce duplicate rows under OR or complex joins. - Fixed
values()andvalues_list()returning duplicated logical rows when OR joins were involved. first()andlast()now operate on deduped results in OR scenarios.- Prevented ManyToMany and embedded relation querysets from being deduped incorrectly
(avoid breakingalbum.tracks.all()and similar accessors). - Stabilised internal OR/local_OR clause handling to ensure consistent join inference.
Version 0.35.4
Added
- Support for
queryset_classin the managers. This allows to override the defaultQuerysetwith a custom one.
This is useful when we need to have nested querysets that relies on an initial manager to be custom.
Example
from edgy import Manager, QuerySet
class CustomQuerySet(QuerySet):
def filter(...):
...
class CustomManager(Manager):
queryset_class = CustomQuerySet