sqlalchemy.topological.sort_as_subsets

Here are the examples of the python api sqlalchemy.topological.sort_as_subsets taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: CouchPotatoV1 Source File: unitofwork.py
Function: execute
    def execute(self):
        postsort_actions = self._generate_actions()
        
        #sort = topological.sort(self.dependencies, postsort_actions)
        #print "--------------"
        #print self.dependencies
        #print list(sort)
        #print "COUNT OF POSTSORT ACTIONS", len(postsort_actions)
        
        # execute
        if self.cycles:
            for set_ in topological.sort_as_subsets(
                                            self.dependencies, 
                                            postsort_actions):
                while set_:
                    n = set_.pop()
                    n.execute_aggregate(self, set_)
        else:
            for rec in topological.sort(
                                    self.dependencies, 
                                    postsort_actions):
                rec.execute(self)