| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
- 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
|
| | |
|
| |
|
|
| |
(sets.Set-based collections & DB-API returns still work.)
|
| | |
|
| |
|
|
| |
0.4 development continues at /sqlalchemy/branches/rel_0_4
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
classes can now implement arbitrary __eq__ and friends. [ticket:676]
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
| |
speed up ThreadLocal for python 2.3 [ticket:743]
clean in topo (in patch from [ticket:743])
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
maintenance branch in branches/rel_0_3.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
straight <pre> + trim() func
for now. applies most of [ticket:214], compliemnts of Lele Gaifax
|
| |
|
|
| |
[ticket:423]
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
mappers to force the direction of the parent/child relationship. replaces
the usage of the "foreignkey" parameter for "switching" the direction;
while "foreignkey" can still be used to "switch" the direction of a parent/
child relationship, this usage is deprecated; "foreignkey" should always
indicate the actual foreign key columns from now on.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
for [ticket:362]
|
| | |
|
| | |
|
| |
|
|
| |
they are huge
|
| | |
|
| |
|