| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
condition....
|
|
|
|
| |
to avoid compilation name conflicts
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
well as throughout the call-chain for those. lazy loader honors the "session" of the parent object, + added simple unit test
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
argument support to the mapper.select() methd. associated unit test tweaks and mapper integration.
|
|
|
|
| |
had None for a parent, due to addition in [changeset:1186] which added a "deletion" traversal for many-to-one relationships. added unittest.
|
|
|
|
|
|
| |
refresh() condition
added None check in PropertyLoader many-to-one private deletion traversal, fixes byroot_tree (add a unit test for that)
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
to allow single-object commits to cascade into private child objects
|
| |
|
|
|
|
| |
table !
|
|
|
|
| |
attributes on new objects
|
|
|
|
| |
arithmetic up front, instead of on each row
|
| |
|
|
|
|
| |
time, as it is re-initialized as a copy made for an inheriting mapper, and no longer can get to the correct inheriting table.
|
|
|
|
|
|
|
| |
closed-minded about how it creates the join crit
erion as well as the sync rules in inheritance. syncrules have been tightened up to be smarter about creating a new
SyncRule given lists of tables and a join clause. properties also checks for relation direction against the "noninherited table" which for the moment makes it a stronger requirement that a relation to a mapper must relate to that mapper's main table, not any tables that it inherits from.
|
|
|
|
| |
"parent"/"mapper" table to be more constrained. this change was originally in [changeset:1101] to help out the polymorph example but it now works without it. the change breaks the Post/Comment relationship in the ZBlog demo since the Post mapper has the comments table inside of it (also with no workaround).
|
|
|
|
|
|
|
|
| |
the case of
inheritance. relations now create priamry/secondary joins against that lead table. if you want to create it against
an inherited table, use explicit join conditions.
added 'correlate' argument to CompoundSelect to get polymorph example working again.
|
|
|
|
| |
the primaryjoin and secondaryjoin, and raises a descriptive exception if so.
|
|
|
|
| |
mapper, when the inheritance/eager loads share the same table. mapper inheritance will also favor the columns from the child table over those of the parent table when assigning column values to object attributes. "correlated subqueries" require a flag "correlated=True" if they are in the FROM clause of another SELECT statement, and they want to be correlated. this flag is set by default when using an "exists" clause.
|
| |
|
| |
|
|
|
|
| |
send keyword arguments that will be placed on the relation
|
|
|
|
|
|
| |
tests as a unit test eagerload2.
got eagerload1 to be a unit test also.
|
|
|
|
|
| |
fixes to relation to enable it to locate "direction" more consistently with inheritance relationships
more tweaks to parenthesizing subqueries, unions, etc.
|
|
|
|
|
|
| |
phase of a one-to-many post update
closes [ticket:67]
|
|
|
|
|
|
| |
[ticket:81]
TableFinder becomes a list-implementing object (should probably create clauseutils or sqlutils for these little helper visitors)
|
|
|
|
| |
to make use of it as well as properties. also clarifies the "synchronization" idea
|
|
|
|
| |
work even when one side of the relation has both tables in it (new unittest will be added to inheritance.py to show this...)
|
|
|
|
|
|
| |
so check for this
during delete
|
|
|
|
| |
getting messed up by late add_property() calls
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this includes:
sql.Alias object keeps track of the immediate thing it aliased as well
as the ultimate non-aliased (usually a Table) object, so that proxied columns can have
a "parent" attribute
some cleanup to SelectBaseMixin.order_by_clause to allow easier access, needs more cleanup
engine has been making two ResultProxies all this time, added "return_raw" quickie flag to
disable that
some cleanup to _get_col_by_original so that it also works for oid columns, new eager load stuff
more aggressively aliaseses orderby's so this was needed
EagerLoader now makes "chains" of unique aliased eager loaders in all cases. no need for
use_alias/selectalias anymore since it aliases every time.
properly detects recursive eager loads and terminates them with a lazyloader, instead of
raising an exception. totally simplified setup() and init() is more straightforward and has
a single codepath now instead of two or three.
|
|
|
|
|
| |
version has "property" accessor which returns MapperProperty at
the class level
|
| |
|
|
|
|
| |
compile_synchronizers in PropertyLoader needed to take into account the full list of tables for each mapper when looking for synchronization rules, not just primary table
|
| |
|
| |
|
| |
|
|
|
|
| |
of this property until after the object has been saved, and then to re-sync and force an update. used to break otherwise intra-row cycles. added for "many-to-one" so far.
|
| |
|
|
|
|
| |
also "foreignkey" property can be a list, particularly for a self-referential table with a multi-column join condition
|