452 Commits

Author SHA1 Message Date
Mike Bayer 5156d5141a anonymous indexes use column._label to avoid name collisions 2006-05-23 14:59:32 +00:00
Mike Bayer 1bbee67774 hypothetical (failing) test for primary key selection of joins 2006-05-23 14:59:11 +00:00
Mike Bayer 030c50d20d c. martinez' fix to slicing logic 2006-05-18 14:16:56 +00:00
Mike Bayer 79555fb434 rick morrison's CASE statement + unit test 2006-05-15 23:47:07 +00:00
Mike Bayer 00b607ded6 extra unicode tests
added 'threaded' keyword argument to oracle.py (pretty important....)
2006-05-15 16:44:38 +00:00
Mike Bayer 116295d097 got removed somehow 2006-05-05 17:52:00 +00:00
Mike Bayer deb80dbc7b added 'supports', 'unsupports' decorators to unittests so that they can all pass on all DBs 2006-04-29 16:42:37 +00:00
Mike Bayer 337d3b2685 more work on types. this is the simplest implementation which is a little more manual 2006-04-29 16:12:02 +00:00
Mike Bayer 4cff2c1a3c *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....) 2006-04-29 01:05:13 +00:00
Mike Bayer 409acb4208 fix for [ticket:169], moves the creation of "default" parameters more accurately
where theyre supposed to be
2006-04-28 23:31:59 +00:00
Mike Bayer b0fff23df8 fix to subquery parens 2006-04-28 15:02:49 +00:00
Mike Bayer a456fd5475 the latest and greatest method to keep attributes from growing 2006-04-27 23:56:09 +00:00
Mike Bayer 17c4db290e added unittest to verify eager loads refresh expired instances 2006-04-26 00:45:24 +00:00
Mike Bayer 0d90e5cdab removed a "swap" from the lazy binary clause. added a test for that condition.... 2006-04-24 22:11:13 +00:00
Mike Bayer 42c53ec821 lazyload clause calculation uses anonymous keynames for the bind parameters, to avoid compilation name conflicts 2006-04-24 19:21:12 +00:00
Jonathan LaCour e008839e81 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!
2006-04-23 21:41:36 +00:00
Mike Bayer 37a0c95f57 some cleanup 2006-04-21 16:38:29 +00:00
Mike Bayer f85681d8a9 what a strange thing to not be in there.... 2006-04-19 19:47:02 +00:00
Mike Bayer d1fa8fe327 fixed up expunge() and the continuing circular refs in attributes, added a unit test for the whole thing 2006-04-19 19:33:51 +00:00
Mike Bayer 33f87bd0f5 got circular many-to-many relationships to work 2006-04-19 18:24:45 +00:00
Mike Bayer 08c003ec00 added _get_from_obj to TypeClause 2006-04-17 01:15:19 +00:00
Mike Bayer 0542d35f39 a new batching algorithm for the topological sort 2006-04-16 23:47:26 +00:00
Mike Bayer 56feb8d900 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 2006-04-14 18:11:54 +00:00
Mike Bayer 80ed5b5cc2 added a failing unittest for inheriting mappers with add_property 2006-04-11 16:59:18 +00:00
Mike Bayer 5bda70e770 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.
2006-04-06 21:12:00 +00:00
Mike Bayer dbf936c30b 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 2006-04-06 19:01:14 +00:00
Mike Bayer ca00cd4cc2 added pickle test 2006-04-06 14:32:57 +00:00
Mike Bayer 680c276073 moves the binding of a TypeEngine object from "schema/statement creation" time into "compilation" time 2006-04-06 01:15:46 +00:00
Robert Leftwich 1c8f771344 Added cast() to allow use of cast(tbl.c.col as Numeric(4,2)) in select and where clauses. Unit tests for same. 2006-04-04 00:28:33 +00:00
Mike Bayer 7999c3baad added a unit test for the "version_id" keyword argument, which passes based on previous changes to Mapper 2006-04-03 22:01:35 +00:00
Mike Bayer abc376c702 added 'entity_name' keyword argument to mapper. a mapper is now associated with a class via
the class object as well as the optional entity_name parameter, which is a string defaulting to None.
any number of primary mappers can be created for a class, qualified by the entity name.  instances of those classes
will issue all of their load and save operations through their entity_name-qualified mapper, and maintain separate identity from an otherwise equilvalent object.
2006-04-03 21:43:22 +00:00
Mike Bayer 837b5407a4 attributes overhaul #2 - attribute manager now tracks class-level initializers strictly through the SmartPropery instances attached to the class, so that attributes retain their natural polymorphic behavior. naming conventions migrating to "managed_attribute", simplifying codepaths. 2006-04-03 21:04:16 +00:00
Mike Bayer c026339ad8 merged Rick Morrison / Runar Petursson's MS-SQL module, with adjustments to alias schema-qualified Table objects 2006-04-03 01:35:48 +00:00
Mike Bayer b7ee8758e8 fixed reset_history method when applied to an attribute that had an attribute-level TriggeredAttribute set on it, added unit test. 2006-04-02 04:13:03 +00:00
Mike Bayer 225b9ec138 fix to oeprator test for new parenthesized rules 2006-04-02 04:09:05 +00:00
Mike Bayer 3cd04eee8a added "parenthesis" check on binary clauses referencing binary clauses, for [ticket:144] 2006-04-02 03:22:17 +00:00
Mike Bayer 00014ef6c8 cleanup of attributes, better naming, added weak reference to base managed attribute to break circular refs, slightly shorter codepaths in some cases. added performance tester 2006-04-01 21:00:41 +00:00
Mike Bayer 6133da0f78 second assertion 2006-03-31 23:46:02 +00:00
Mike Bayer e219800908 added unit test for the old commit that was in [changeset:1186]. modified its behavior a bit to not delete private relationships unless they were already marked as deleted at the attribute manipulation level. got "switching" behavior from one private relationship to another to work, added a unit test for that. 2006-03-31 23:43:20 +00:00
Mike Bayer 66528a7264 added for_update flag to Select/CompoundSelect 2006-03-31 22:28:17 +00:00
Mike Bayer d929ae8d90 introducing...the mods package ! the SelectResults thing moves as the first mod 2006-03-31 07:20:13 +00:00
Mike Bayer 1a5e65c14f Jonas Borgström's fantastic SelectRsults patch that adds dynamic list argument support to the mapper.select() methd. associated unit test tweaks and mapper integration. 2006-03-31 02:25:59 +00:00
Mike Bayer 6698e1ab44 backrefs on cyclical relationships were breaking for the "root" node which had None for a parent, due to addition in [changeset:1186] which added a "deletion" traversal for many-to-one relationships. added unittest. 2006-03-27 02:02:06 +00:00
Mike Bayer cb3be7803b rework to expire() to make it smarter. when you expire(), history is immediately removed as well as explicit from dirty/deleted lists. this also changes uow.rollback_object() to remove from those lists, which is strange that it didnt do that before. anyway the mapper, when selecting and creating instances, asks the uow if this already identity-mapped instance is expired, and if so refreshes it on the fly, saving the need for the re-_get() operation, if some other query happens to touch upon the expired object. unit test added to confirm this. 2006-03-26 21:44:22 +00:00
Mike Bayer 995d9afb83 removed circular loop in creating new list elements, fixes a common refresh() condition
added None check in PropertyLoader many-to-one private deletion traversal, fixes byroot_tree (add a unit test for that)
2006-03-25 21:44:42 +00:00
Mike Bayer f7afe05290 removed all "tablename + '_' + columname" code and replaced with column._label, to take
advantage of column labeling rules
bind param compilation,when it unique-ifys the name of bind params, maintains the length
of the bind parameter name instead of appending to it
2006-03-25 21:14:54 +00:00
Mike Bayer 3282c22786 ResultProxy has an iterator interface 2006-03-25 02:49:10 +00:00
Mike Bayer fcbd4f1539 added expunge() method to objectstore
correction in attributes reset_history to really reset in all cases
added unit tests testing refresh()/expire() bug that was fixed by reset_history thing
2006-03-25 00:17:51 +00:00
Mike Bayer 26ec8e13fa added oracle8 test target, sets use_ansi to false
got mapper, objectstore, inheritance unittest working with oracle8, tweaks to join syntax
2006-03-23 06:35:27 +00:00
Mike Bayer 67afbfd8af some adjustments to oracle non-ansi join concatenation, 'row number over' syntax 2006-03-23 06:17:29 +00:00