summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/mapping
Commit message (Collapse)AuthorAgeFilesLines
* merged 0.2 branch into trunk; 0.1 now in sqlalchemy/branches/rel_0_1Mike Bayer2006-05-259-4139/+0
|
* fixed a _get_criterion mismatch, cleaned up types + updated types docMike Bayer2006-05-052-16/+17
|
* added from_obj option to select()Mike Bayer2006-05-051-3/+6
|
* save_obj/delete_obj need to specify column types to binds for primary key ↵Mike Bayer2006-05-041-4/+4
| | | | criterion
* "order_by" parameter propigated to inheriting mappersMike Bayer2006-05-031-0/+2
| | | | oracle ROW_NUMBER logic uses select.oid_column to get default order by
* commented out default schema name checkMike Bayer2006-04-261-1/+1
|
* removed a "swap" from the lazy binary clause. added a test for that ↵Mike Bayer2006-04-241-2/+2
| | | | condition....
* lazyload clause calculation uses anonymous keynames for the bind parameters, ↵Mike Bayer2006-04-241-5/+17
| | | | to avoid compilation name conflicts
* added temporary option "construct_new" to mapper which will cause the mapper ↵Mike Bayer2006-04-231-1/+18
| | | | to use __new__ to create loaded instances instead of the __init__ method
* fixed up expunge() and the continuing circular refs in attributes, added a ↵Mike Bayer2006-04-191-1/+1
| | | | unit test for the whole thing
* got circular many-to-many relationships to workMike Bayer2006-04-191-8/+6
|
* mapper will verify class inheritance scheme; also will not re-init inherited ↵Mike Bayer2006-04-182-1/+4
| | | | | | 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
* fix for [ticket:158] regarding translate rowMike Bayer2006-04-171-2/+2
|
* a new batching algorithm for the topological sortMike Bayer2006-04-161-14/+49
|
* had to take out the "treeification" of the dependency sort as it doenst ↵Mike Bayer2006-04-142-5/+5
| | | | really work , added test conditions to the dependency test + the original test that failed
* a little spring cleaning for the util package, etcMike Bayer2006-04-073-0/+21
|
* split up Session into Session/LegacySession, added some new constructor argsMike Bayer2006-04-062-98/+116
| | | | | | | | 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
* mapper's querying facilities migrated to new query.Query() object, which can ↵Mike Bayer2006-04-065-303/+397
| | | | | | | | | 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.
* added explicit "session" argument to get(), select_whereclause in mapper, as ↵Mike Bayer2006-04-062-38/+46
| | | | well as throughout the call-chain for those. lazy loader honors the "session" of the parent object, + added simple unit test
* added 'entity_name' keyword argument to mapper. a mapper is now associated ↵Mike Bayer2006-04-033-60/+77
| | | | | | | | 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.
* attributes overhaul #2 - attribute manager now tracks class-level ↵Mike Bayer2006-04-031-2/+2
| | | | 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.
* made order_by/group_by construction a little more simplisitcMike Bayer2006-04-031-1/+1
| | | | | fix to mapper extension CompoundSelect can export all columns now, not sure if theres any advantage there
* added unit test for the old commit that was in [changeset:1186]. modified ↵Mike Bayer2006-03-312-9/+10
| | | | 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.
* adjustments...Mike Bayer2006-03-311-3/+4
|
* tweak...Mike Bayer2006-03-311-7/+7
|
* introducing...the mods package ! the SelectResults thing moves as the first modMike Bayer2006-03-313-90/+49
|
* starting to refactor mapper slightly, adding entity_name, version_id_col, ↵Mike Bayer2006-03-311-28/+23
| | | | allowing keywords in mapper.options()
* wow, __len__ is a real disaster when combined with list()...turning that offMike Bayer2006-03-311-10/+31
|
* Jonas Borgström's fantastic SelectRsults patch that adds dynamic list ↵Mike Bayer2006-03-313-6/+80
| | | | argument support to the mapper.select() methd. associated unit test tweaks and mapper integration.
* tweak to mapper to allow inheritance on the same table.Mike Bayer2006-03-271-15/+17
|
* backrefs on cyclical relationships were breaking for the "root" node which ↵Mike Bayer2006-03-272-0/+7
| | | | had None for a parent, due to addition in [changeset:1186] which added a "deletion" traversal for many-to-one relationships. added unittest.
* added always_refresh flag. when the mapper loads rows, it will pull objects ↵Mike Bayer2006-03-261-1/+5
| | | | from the identity map normally, but always blows away their attributes and replaces with those from the database, including changes
* rework to expire() to make it smarter. when you expire(), history is ↵Mike Bayer2006-03-263-5/+25
| | | | 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.
* column label generation checks for a conflict against a column named the ↵Mike Bayer2006-03-261-2/+2
| | | | | | same as the label comment in mapper
* improved translation of rows when proxying rows from one mapper to another.Mike Bayer2006-03-261-8/+16
|
* util: the __setitem__ method on historyarraylist was meaningless, surprising ↵Mike Bayer2006-03-261-4/+0
| | | | | | | | nobody noticed that. types: added PickleType, its slightly trickier than trivial, so OK now its standard. attributes: the level of pain if an AttributeError occurs inside a CallableProp, in combination with an object that implements __getattr__, is too deep for me to put the users through....so convert AttributeErrors to Assertions... engine: im not a fan of catching universal exceptions and squashing them
* removed circular loop in creating new list elements, fixes a common ↵Mike Bayer2006-03-251-0/+4
| | | | | | refresh() condition added None check in PropertyLoader many-to-one private deletion traversal, fixes byroot_tree (add a unit test for that)
* removed all "tablename + '_' + columname" code and replaced with ↵Mike Bayer2006-03-252-5/+5
| | | | | | | | 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
* added expire/refresh/expunge to assign_mapperMike Bayer2006-03-251-0/+9
|
* got some support for mapping to a select that only selects some of the ↵Mike Bayer2006-03-252-8/+26
| | | | columns of an underlying table
* added check in SessionTrans.begin() that the underlying unit of work is ↵Mike Bayer2006-03-251-0/+2
| | | | still the current uow
* added expunge() method to objectstoreMike Bayer2006-03-252-2/+14
| | | | | 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
* some more tweaks to get more advanced polymorphic stuff to workMike Bayer2006-03-242-4/+35
|
* added some extra traversal for one-to-many/many-to-one "private" relations ↵Mike Bayer2006-03-221-9/+21
| | | | to allow single-object commits to cascade into private child objects
* removed printMike Bayer2006-03-221-1/+0
|
* added "nest_on" option for Session, so nested transactions can occur mostly ↵Mike Bayer2006-03-222-6/+35
| | | | | | at the Session level, fixes [ticket:113]
* fixed lazy clause construction to go off...you guessed it...the noninherited ↵Mike Bayer2006-03-211-1/+2
| | | | table !
* a few changes to attributes.py to allow faster initialization of object ↵Mike Bayer2006-03-212-2/+8
| | | | attributes on new objects
* a refactoring to the EagerLoaders' _instance method to do a bunch of column ↵Mike Bayer2006-03-211-6/+18
| | | | arithmetic up front, instead of on each row
* a few tweaks and the polymorph example can also use eager loadingMike Bayer2006-03-201-0/+8
|