summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/topological.py
Commit message (Collapse)AuthorAgeFilesLines
* - move topological, queue into utilMike Bayer2010-12-051-83/+0
| | | | | - move function_named into test.lib.util - use @decorator for all decorators in test/
* don't need itertools hereMike Bayer2010-09-291-8/+6
|
* - CircularDependencyError now has .cycles and .edgesMike Bayer2010-09-291-13/+13
| | | | | | members, which are the set of elements involved in one or more cycles, and the set of edges as 2-tuples. [ticket:1890]
* - beef up the --reversetop test option to embed RandomSet throughout the ORMMike Bayer2010-04-151-4/+0
| | | | | | | - with m2m we have to go back to the previous approach of having both sides of the DP fire off, tracking each pair of objects. history may not be consistently present in one side or the other - this revealed a whole lot of issues with self-referential m2m, which are fixed
* duhMike Bayer2010-04-071-4/+3
|
* - added missing coverage for self-referential many-to-many flushesMike Bayer2010-04-061-0/+3
| | | | | - some other areas where per-state deps are called and an empty result returned are still lacking coverage.
* - EdgeCollection can now go awayMike Bayer2010-04-061-31/+25
| | | | - fix reflection test
* a RandomSet implementation useful for swapping into topologicalMike Bayer2010-04-061-0/+1
|
* remove printsMike Bayer2010-04-061-13/+1
|
* breakthrough, wowMike Bayer2010-04-051-86/+27
|
* looks like most of the issues are because we're losing insert orderingMike Bayer2010-04-051-0/+47
| | | | | | on cycles. so lets reintroduce the organize as tree component, which works here. still need to make it meaningful by teaching the save/delete state actions to receive a set of items to match up
* - further reduce what topological has to do, expects full list of nodesMike Bayer2010-04-041-25/+7
| | | | | - fix some side-effect-dependent behaviors in uow. we can now unconditionally remove "disabled" actions without rewriting
* merge default branchMike Bayer2010-04-041-1/+0
|\
| * - id(obj) is no longer used internally within topological.py,Mike Bayer2010-04-011-10/+9
| | | | | | | | | | as the sorting functions now require hashable objects only. [ticket:1756]
| * - 'cycle' is a stack here - needs to be a list.Mike Bayer2010-03-311-2/+2
| |
* | o2m/m2o pretty much there, minus post update.Mike Bayer2010-04-031-1/+2
| |
* | deletes, rudimentary many-to-onesMike Bayer2010-03-311-3/+0
| |
* | really got topological going. now that we aren't putting fricking mapped ↵Mike Bayer2010-03-311-81/+42
| | | | | | | | | | | | objects into it all that id() stuff can go
* | merge trunk. Re-instating topological._find_cycles for the momentMike Bayer2010-03-301-0/+33
|\ \ | |/
| * some apparent refactoringsMike Bayer2010-03-211-14/+9
| |
* | start sketching ideas for a rewritten unit of work.Mike Bayer2010-03-191-179/+20
|/ | | | | | | | | | the basic idea is to bring topological back down to the raw function, then the whole UOW constructs itself as very fine grained elements with full dependencies to each other. then a straight execute with a straight sort. the hope is that the mechanism here would be vastly simpler. while the presence of a large number of fine-grained records may be expensive it still is potentially a lot easier to distill into C code, as the uow's structure now consists of data.
* happy new yearMike Bayer2010-01-071-1/+1
|
* use *args with log.debug()/log.info(), [ticket:1520]Mike Bayer2009-08-261-1/+1
|
* merge 0.6 series to trunk.Mike Bayer2009-08-061-9/+10
|
* slight cleanup i want in 0.5/0.6Mike Bayer2009-05-311-9/+6
|
* happy new yearMike Bayer2009-01-121-1/+1
|
* - annual unitofwork cleanupMike Bayer2008-09-151-4/+1
| | | | | | | - moved conversion of cyclical sort to UOWTask structure to be non-recursive - reduced some verbosity - rationale for the "tree" sort clarified - would love to flatten all of uow topological sorting, sorting within mapper._save_obj() into a single sort someday
* - Dropped `reversed` emulationJason Kirtland2008-07-151-2/+1
|
* - Removed 2.3 set emulations/enhancements.Jason Kirtland2008-07-151-11/+11
| | | | (sets.Set-based collections & DB-API returns still work.)
* And thus ends support for Python 2.3.Jason Kirtland2008-07-151-3/+3
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-5/+5
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* happy new yearMike Bayer2008-01-011-1/+1
|
* [ticket:888] continued, synonym add_propMike Bayer2007-12-081-0/+1
|
* ok found itMike Bayer2007-12-081-2/+2
|
* - flush() refactor merged from uow_nontree branch r3871-r3885Mike Bayer2007-12-081-168/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - topological.py cleaned up, presents three public facing functions which return list/tuple based structures, without exposing any internals. only the third function returns the "hierarchical" structure. when results include "cycles" or "child" items, 2- or 3- tuples are used to represent results. - unitofwork uses InstanceState almost exclusively now. new and deleted lists are now dicts which ref the actual object to provide a strong ref for the duration that they're in those lists. IdentitySet is only used for the public facing versions of "new" and "deleted". - unitofwork topological sort no longer uses the "hierarchical" version of the sort for the base sort, only for the "per-object" secondary sort where it still helps to group non-dependent operations together and provides expected insert order. the default sort deals with UOWTasks in a straight list and is greatly simplified. Tests all pass but need to see if svilen's stuff still works, one block of code in _sort_cyclical_dependencies() seems to not be needed anywhere but i definitely put it there for a reason at some point; if not hopefully we can derive more test coverage from that. - the UOWEventHandler is only applied to object-storing attributes, not scalar (i.e. column-based) ones. cuts out a ton of overhead when setting non-object based attributes. - InstanceState also used throughout the flush process, i.e. dependency.py, mapper.save_obj()/delete_obj(), sync.execute() all expect InstanceState objects in most cases now. - mapper/property cascade_iterator() takes InstanceState as its argument, but still returns lists of object instances so that they are not dereferenced. - a few tricks needed when dealing with InstanceState, i.e. when loading a list of items that are possibly fresh from the DB, you *have* to get the actual objects into a strong-referencing datastructure else they fall out of scope immediately. dependency.py caches lists of dependent objects which it loads now (i.e. history collections). - AttributeHistory is gone, replaced by a function that returns a 3-tuple of added, unchanged, deleted. these collections still reference the object instances directly for the strong-referencing reasons mentiontioned, but it uses less IdentitySet logic to generate.
* a little refinement to topological options, more to comeMike Bayer2007-12-071-5/+7
|
* - decruftify old visitors used by orm, convert to functions thatMike Bayer2007-11-241-3/+6
| | | | | | use a common traversal function. - TranslatingDict is finally gone, thanks to column.proxy_set simpleness...hooray ! - shoved "slice" use case on RowProxy into an exception case. knocks noticeable time off of large result set operations.
* - Removed equality, truth and hash() testing of mapped instances. MappedJason Kirtland2007-11-031-6/+6
| | | | classes can now implement arbitrary __eq__ and friends. [ticket:676]
* - mapper compilation has been reorganized such that most compilationMike Bayer2007-09-021-26/+3
| | | | | | | | | | occurs upon mapper construction. this allows us to have fewer calls to mapper.compile() and also to allow class-based properties to force a compilation (i.e. User.addresses == 7 will compile all mappers; this is [ticket:758]). The only caveat here is that an inheriting mapper now looks for its inherited mapper upon construction; so mappers within inheritance relationships need to be constructed in inheritance order (which should be the normal case anyway).
* use threading.local if availableJason Kirtland2007-08-151-1/+1
| | | | | speed up ThreadLocal for python 2.3 [ticket:743] clean in topo (in patch from [ticket:743])
* mass has_key->__contains__ migration, [ticket:738]Mike Bayer2007-08-151-6/+6
|
* switch "if not len(x)" to "if not x"Jonathan Ellis2007-08-031-2/+2
|
* only one instance of while len(...)Jonathan Ellis2007-08-031-2/+2
|
* add comment, intermediate var for readabilityJonathan Ellis2007-08-031-5/+5
|
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-2/+1
| | | | maintenance branch in branches/rel_0_3.
* - fixed usage of 2.4-only "reversed" in topological.py [ticket:506]Mike Bayer2007-03-081-1/+1
|
* - fixed use_alter flag on ForeignKeyConstraint [ticket:503]Mike Bayer2007-03-071-3/+3
|
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-51/+95
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax
* - fix for very large topological sorts, courtesy ants.aasma at gmail ↵Mike Bayer2007-02-131-39/+42
| | | | [ticket:423]
* removed extra _find_cycles callMike Bayer2007-02-021-1/+0
|