Mike Bayer [Sat, 27 May 2006 16:39:05 +0000 (16:39 +0000)]
circular dependency sort will not create new UOWTasks/UOWDependencyProcessors mid-stream
further construction on migrating UOWTask to be fully polymorphic
Mike Bayer [Sat, 27 May 2006 05:45:21 +0000 (05:45 +0000)]
unitofwork more Set oriented now
MapperProperty now has "localparent" and "parent" attributes, which in the case of
inheritance represent the mapper the property is attached to, and the original mapper it was created on.
the unitofwork now keeps the dependency processors derived from those properties unique so inheritance
structures dont register redundant dependency processors.
Mike Bayer [Sat, 27 May 2006 01:19:56 +0000 (01:19 +0000)]
converted sqlsoup, got its doctests working (werent working in 0.1 either....), added doctest hook to testsuite
fix to selectone_by/selectone when zero rows returned
Mike Bayer [Sat, 27 May 2006 00:13:12 +0000 (00:13 +0000)]
added has_key to RowProxy, + caching of key lookups
fix for mapper translate_row for deferred columns
continuing with the "polymorph-tizing" of the unit of work, dependency processing accesses objects on each target task polymorphically
Mike Bayer [Thu, 25 May 2006 17:53:06 +0000 (17:53 +0000)]
pretty major change to inheritance topological sorting - mapper dependencies are calculated
based on their ultimate "base inherited" mapper, UOWTasks organized into recursive inheritance structures based on the inheritance of the mappers. this allows tasks across a class/mapper inheritance hierarchy to properly interact with other dependency processors and sub-tasks.
Mike Bayer [Sat, 29 Apr 2006 01:05:13 +0000 (01:05 +0000)]
*another* big types change....the old way was still wrong...this way is better (still need to go through it again since i am apparently type-impaired....)
Jonathan LaCour [Sun, 23 Apr 2006 21:41:36 +0000 (21:41 +0000)]
Got the unit tests running again, apart from the two that were not working in
the first place. The changes to process_relationships and to sqlachemy itself
were causing a double 'assign_mapper' call to cause issues. Now, we basically
defer calling assign_mapper until process_relationships in cases where there
are defined relationships.
Also, I moved ActiveMapper to always use the default engine, as there were a
lot of hacks inside ActiveMapper to allow for engine swapping. The use of the
default engine and the "global_connect" functionality significantly improves
the usability of ActiveMapper.
ActiveMapper will be getting a bit of a refactor/cleanup at some point in the
nearish future, as it has drifted a bit to complexity with the addition of some
features. For now, this should do the trick!
Jonathan LaCour [Thu, 20 Apr 2006 21:04:03 +0000 (21:04 +0000)]
Updates to ActiveMapper contributed by Gabriel Jacobo. The main purpose of the
changes is to ensure that relationships are properly detected and built in the
proper order. This should fix some problems that people were having with
ActiveMapper requiring classes to be declared in a specific order.
Mike Bayer [Tue, 18 Apr 2006 18:24:07 +0000 (18:24 +0000)]
mapper will verify class inheritance scheme; also will not re-init inherited property, as the improved attribute system seems to handle inheritance OK and allows the property to keep its correct initialization on the parent
exceptions import in query
Mike Bayer [Fri, 14 Apr 2006 18:11:54 +0000 (18:11 +0000)]
had to take out the "treeification" of the dependency sort as it doenst really work , added test conditions to the dependency test + the original test that failed
Mike Bayer [Thu, 6 Apr 2006 23:46:02 +0000 (23:46 +0000)]
split up Session into Session/LegacySession, added some new constructor args
created AbstractEngine class which provides base for SQLEngine and will also
provide base for ConnectionProxy, so SQL binding can be to an engine or specific
connection resource
ClauseElements get using() method which can take AbstractEngines for execution
made more separation between SchemaItems and bound engine
Mike Bayer [Thu, 6 Apr 2006 21:12:00 +0000 (21:12 +0000)]
mapper's querying facilities migrated to new query.Query() object, which can receive session-specific context via the mapper.using() statement. reuslting object instances will be bound to this session, but query execution still handled by the SQLEngines implicit in the mapper's Table objects.
session now propigates to the unitofwork UOWTransaction object, as well as mapper's save_obj/delete_obj via the UOWTransaction it receives. UOWTransaction explicitly calls the Session for the engine corresponding to each Mapper in the flush operation, although the Session does not yet affect the choice of engines used, and mapper save/delete is still using the Table's implicit SQLEngine.
changed internal unitofwork commit() method to be called flush().
removed all references to 'engine' from mapper module, including adding insert/update specific SQLEngine methods such as last_inserted_ids, last_inserted_params, etc. to the returned ResultProxy so that Mapper need not know which SQLEngine was used for the execute.
changes to unit tests, SelectResults to support the new Query object.
Mike Bayer [Thu, 6 Apr 2006 19:01:14 +0000 (19:01 +0000)]
added explicit "session" argument to get(), select_whereclause in mapper, as well as throughout the call-chain for those. lazy loader honors the "session" of the parent object, + added simple unit test