Mike Bayer [Thu, 15 Apr 2010 04:13:48 +0000 (00:13 -0400)]
- beef up the --reversetop test option to embed RandomSet throughout the ORM
- 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
Mike Bayer [Tue, 13 Apr 2010 00:20:50 +0000 (20:20 -0400)]
further testing reveals that cursor.rowcount is only called with update/delete and DDL,
and also that FB's cursor.rowcount is a little expensive, but not dramatically.
added a test to ensure cursor.rowcount is only called on update/delete.
the current default for firebird enable_rowcount is now True, leaving all the
options to turn it off etc..
Mike Bayer [Sun, 11 Apr 2010 20:37:49 +0000 (16:37 -0400)]
- The functionality of result.rowcount is now disabled
by default, and can be re-enabled using the 'enable_rowcount'
flag with create_engine(), as well as the 'enable_rowcount'
execution context flag on a per-execute basis. This because
cursor.rowcount requires cursor access (can't be evaluated
lazily since the result auto-closes) and also incurs an
expensive round-trip.
Mike Bayer [Sun, 11 Apr 2010 19:37:20 +0000 (15:37 -0400)]
- added a test for the solution in [ticket:1757].
- this does imply that a lot of the "test the RowProxy" tests in sql/test_query might be better off in engine/test_execute or perhaps engine/test_resultproxy
Mike Bayer [Sun, 11 Apr 2010 16:03:41 +0000 (12:03 -0400)]
- somejoin.select(fold_equivalents=True) is no longer
deprecated, and will eventually be rolled into a more
comprehensive version of the feature for [ticket:1729].
Mike Bayer [Sat, 10 Apr 2010 23:21:54 +0000 (19:21 -0400)]
- starting to groom the branch for its inclusion
- one-to-many relationships now maintain a list of positive
parent-child associations within the flush, preventing
previous parents marked as deleted from cascading a
delete or NULL foreign key set on those child objects,
despite the end-user not removing the child from the old
association. [ticket:1764]
- re-established Preprocess as unique on their arguments,
as they were definitely duped in inheritance scenarios
- added a "memo" feature to UOWTransaction which represents the usual
pattern of using the .attributes collection
- added the test case from [ticket:1081] into perf/
Mike Bayer [Thu, 8 Apr 2010 22:21:02 +0000 (18:21 -0400)]
starting to arrange things such that unneeded executors aren't getting
pulled into the unit of work at all. this involves dancing around lists
of states, seeing if child objects exist, not adding excessive callcounts
while doing that, etc.
Mike Bayer [Thu, 8 Apr 2010 18:15:11 +0000 (14:15 -0400)]
we can load this sum ahead of time, and if there is none, we dont need a per-state/proc for this at all.
this greatly reduces unnecessary crap in the UOW for complex models.
Mike Bayer [Thu, 8 Apr 2010 01:00:16 +0000 (21:00 -0400)]
- make it exceedlingly obvious that all topological/unitofwork code is
being rewritten, and nothing here should be consulted for any
future activity.
- underscore current topological methods as their API behavior
is changing, possibly in 0.6.1 if [ticket:1742] remains on track
Mike Bayer [Wed, 7 Apr 2010 19:20:20 +0000 (15:20 -0400)]
- ah. oursql didn't have "extra steps" here, the previous system within execution_options()
used by oursql would generate a proxied connection from within the dialect.initialize() phase. the new
clone system bypasses that.
Mike Bayer [Wed, 7 Apr 2010 17:59:18 +0000 (13:59 -0400)]
- Added new 'compiled_cache' execution option. A dictionary
where Compiled objects will be cached when the Connection
compiles a clause expression into a dialect- and parameter-
specific Compiled object. It is the user's responsibility to
manage the size of this dictionary, which will have keys
corresponding to the dialect, clause element, the column
names within the VALUES or SET clause of an INSERT or UPDATE,
as well as the "batch" mode for an INSERT or UPDATE statement.
Mike Bayer [Wed, 7 Apr 2010 17:42:31 +0000 (13:42 -0400)]
- Fixed bug in execution_options() feature whereby the existing
Transaction and other state information from the parent
connection would not be propagated to the sub-connection.
Mike Bayer [Wed, 7 Apr 2010 16:30:02 +0000 (12:30 -0400)]
- dict_ becomes explicit on _get_state_attr_by_column, _set_state_attr_by_column, others,
to reduce on expensive state.dict calls.
- internal getattr(), setattr(), getcommitted() methods
on ColumnProperty, CompositeProperty, RelationshipProperty
have been underscored, signature has changed.
Mike Bayer [Tue, 6 Apr 2010 22:53:51 +0000 (18:53 -0400)]
- Postgresql now reflects sequence names associated with
SERIAL columns correctly, after the name of of the sequence
has been changed. Thanks to Kumar McMillan for the patch.
[ticket:1071]
Mike Bayer [Tue, 6 Apr 2010 22:28:40 +0000 (18:28 -0400)]
- added missing coverage for self-referential many-to-many flushes
- some other areas where per-state deps are called and an empty result returned
are still lacking coverage.
Mike Bayer [Tue, 6 Apr 2010 16:27:01 +0000 (12:27 -0400)]
- Further reworked the "mixin" logic in declarative to
additionally allow __mapper_args__ as a @classproperty
on a mixin, such as to dynamically assign polymorphic_identity.
Mike Bayer [Mon, 5 Apr 2010 21:49:58 +0000 (17:49 -0400)]
so here is kind of the idea. but it doesn't work like it used to.
so I think I want to try to build a smarter "find everything without a dependency"
system that is more inline with how this is running now anyway - i.e.
go through the whole list, find nodes with no dependencies. maybe the
original topological.sort() can do that, not sure.
Mike Bayer [Mon, 5 Apr 2010 21:24:00 +0000 (17:24 -0400)]
looks like most of the issues are because we're losing insert ordering
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
Mike Bayer [Mon, 5 Apr 2010 20:52:56 +0000 (16:52 -0400)]
- many-to-many is up.
- now running on the full suite of tests. unsurprisingly, it appears
there are subtle self-referential issues causing many tests to fail.
Mike Bayer [Mon, 5 Apr 2010 18:53:19 +0000 (14:53 -0400)]
these are some assertions that would make things easier, if they can be maintained.
otherwise, if listonly can go from True to False, then there's the whole cascades issue
to deal with, same for delete moving from False to True and vice versa.
Mike Bayer [Mon, 5 Apr 2010 18:49:35 +0000 (14:49 -0400)]
- enabled the DetectKeySwitch, and additionally added that it need
not execute at all when a one-to-many is present on the reverse side.
- OneToMany can establish a state as "listonly" when passive_updates are enabled
and the change is due to key switch.
Mike Bayer [Sun, 4 Apr 2010 16:24:01 +0000 (12:24 -0400)]
- further reduce what topological has to do, expects full list of nodes
- fix some side-effect-dependent behaviors in uow. we can now
unconditionally remove "disabled" actions without rewriting
Mike Bayer [Sun, 4 Apr 2010 14:18:16 +0000 (10:18 -0400)]
- apparently [ticket:1761] was covered in tests already.
- Usage of version_id_col on a backend that supports
cursor.rowcount for execute() but not executemany() now works
when a delete is issued (already worked for saves, since those
don't use executemany()). For a backend that doesn't support
cursor.rowcount at all, a warning is emitted the same
as with saves. [ticket:1761]