for future optimization. As-is, masseagerload shows a speed up and overall
function reduction compared to 0.4 pre-collections.
- Some minor cleanups in collections + related
a proxy-free, decorator-based approach for user-space instrumentation and
a "view" adapter for interaction with the user's collection within the orm.
Fixes [ticket:213], [ticket:548], [ticket:563].
- This needs many more unit tests. There is significant indirect coverage
through association proxy, but direct tests are needed, specifically in
the decorators and add/remove event firing.
- Collections are now instrumented via decorations rather than
proxying. You can now have collections that manage their own
membership, and your class instance will be directly exposed on the
relation property. The changes are transparent for most users.
- InstrumentedList (as it was) is removed, and relation properties no
longer have 'clear()', '.data', or any other added methods beyond those
provided by the collection type. You are free, of course, to add them
to a custom class.
- __setitem__-like assignments now fire remove events for the existing
value, if any.
- dict-likes used as collection classes no longer need to change __iter__
semantics- itervalues() is used by default instead. This is a backwards
incompatible change.
- subclassing dict for a mapped collection is no longer needed in most cases.
orm.collections provides canned implementations that key objects by a
specified column or a custom function of your choice.
- collection assignment now requires a compatible type- assigning None
to clear a collection or assinging a list to a dict collection will now
raise an argument error.
- AttributeExtension moved to interfaces, and .delete is now .remove
The event method signature has also been swapped around.
- copy_container() removed. ClauseVisitor.traverse() now features "clone"
flag which allows traversal with copy-and-modify-in-place behavior
- select() objects copyable now [ticket:52] [ticket:569]
- improved support for custom column_property() attributes which
feature correlated subqueries...work better with eager loading now.
- accept_visitor() methods removed. ClauseVisitor now genererates method
names based on class names, or an optional __visit_name__ attribute. calls
regular visit_XXX methods as they exist, can optionally call an additional
"pre-descent" enter_XXX method to allow stack-based operations on traversals
- select() and union()'s now have "generative" behavior. methods like
order_by() and group_by() return a *new* instance - the original instance
is left unchanged. non-generative methods remain as well.
- the internals of select/union vastly simplified - all decision making
regarding "is subquery" and "correlation" pushed to SQL generation phase.
select() elements are now *never* mutated by their enclosing containers
or by any dialect's compilation process
test-run- and dialect-specific options on those objects
All tests re-pointed to go through the interceptors
- Removed mysql_engine= from table declarations, replaced with a general
flag indicating storage requirements
- Added ability to choose a global MySQL storage engine for all tests
--mysql-engine=<whatever>
If none is specified, tests use the old db-default/InnoDB behavior
- Added ability to append arbitrary table creation params
--table-option=KEY=VALUE
For MySQL 3, use this to set mysql_type instead of --mysql-engine
- Removed a couple dead test modules
will also autoclose the connection if defined for the operation; this
allows more efficient usage of connections for successive CRUD operations
with less chance of "dangling connections".
- added some extra logic to mapper to try to convert a "foreign key" holding PK-col
into a non-FK col
- apparently, polymorphic loading can now be achieved with LEFT OUTER JOINs quite easily (i.e. no UNIONs).
this needs to be studied further (i.e. why was I making everyone use UNION ALL all this time)
would not return selectable.c.col, if the selectable is a join
of a table and another join involving the same table. messed
up ORM decision making [ticket:593]
- removed is_natural_case function from ANSIIdentifierPreparer
- got all tests/extensions working with new APIs
- axed proxyengine until further notice
- SelectResults folds into a 10 line wrapper for Query, loses join_to() (use join())
- test cleanup