MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / execute_aggregate

Method execute_aggregate

lib/sqlalchemy/orm/unitofwork.py:780–791  ·  view source on GitHub ↗
(self, uow, recs)

Source from the content-addressed store, hash-verified

778
779 @util.preload_module("sqlalchemy.orm.persistence")
780 def execute_aggregate(self, uow, recs):
781 persistence = util.preloaded.orm_persistence
782 cls_ = self.__class__
783 mapper = self.mapper
784 our_recs = [
785 r for r in recs if r.__class__ is cls_ and r.mapper is mapper
786 ]
787 recs.difference_update(our_recs)
788 states = [self.state] + [r.state for r in our_recs]
789 persistence._delete_obj(
790 mapper, [s for s in states if uow.states[s][0]], uow
791 )
792
793 def __repr__(self):
794 return "%s(%s)" % (

Callers

nothing calls this directly

Calls 1

difference_updateMethod · 0.45

Tested by

no test coverage detected