Mike Bayer [Thu, 5 Jul 2007 17:28:31 +0000 (17:28 +0000)]
- the type of a _BooleanExpression should always be Boolean
- added a random generative select() to a test (need to add the real tests to either select.py or generative.py)
Mike Bayer [Thu, 5 Jul 2007 00:29:40 +0000 (00:29 +0000)]
- removed mapper.props, replaced with mapper.get_property()/ mapper.iterate_properties,
since these are the only two use cases for the "__props" collection on mapper.
does synonym resolution so also fixes [ticket:598]
Mike Bayer [Tue, 3 Jul 2007 21:21:11 +0000 (21:21 +0000)]
- added NullType to export list
- any NullType will trigger the "get col type from FK logic", though
there are other issues with this logic (requires the FK be initialized)
- added INT to sqlite resolution map
- adjusted sqlsoup for sql.Select api changes
Jason Kirtland [Tue, 3 Jul 2007 04:31:56 +0000 (04:31 +0000)]
- Add coverage for dict collections, and fixes for dict support.
- Default dict appender name now 'set' to be consistent with duck_typing,
prefer to remove default appender/remover methods from dict altogether.
- Add coverage for MappedCollection and OrderedDict derived dict collections
- Add coverage for raw object collections
- Fix OrderedDict pop() etc., [ticket:585]
- Update orderinglist unit test and remove 'broken until #213' assertion
Jason Kirtland [Mon, 2 Jul 2007 21:30:25 +0000 (21:30 +0000)]
- Started moving collection module docs to doc
- Added collections.attribute_mapped_collection, an attrgetter variant
for mapped_collection
- Added collections unit test stub, and fix accompanying bugs
Mike Bayer [Mon, 2 Jul 2007 18:53:35 +0000 (18:53 +0000)]
- standardized the behavior for table reflection where types can't be located;
NullType is substituted instead, warning is raised.
- consolidation of imports in some db modules
Mike Bayer [Sun, 1 Jul 2007 19:19:56 +0000 (19:19 +0000)]
moved oracles "auto_convert_lobs" logic into a generic dialect
function which attempts to map DBAPI types to TypeEngine instances
at result time. This only occurs for statements that have no typemaps
(i.e. textual statements).
Mike Bayer [Sat, 30 Jun 2007 22:00:05 +0000 (22:00 +0000)]
fix to test created in [changeset:2621], was corrected in trunk in [changeset:2637].
very weird that it was passing on sqlite/postgres since it was producing a SELECT without a FROM.
Mike Bayer [Sat, 30 Jun 2007 21:45:13 +0000 (21:45 +0000)]
- implemented ORM-level composite column types [ticket:211].
constructed via composite(cls, *columns), allows multiple columns
to be expressed as a single object attribute. can be used for primary
key columns also. not yet supported for deferred column loading (but
this is straightforward).
- formatting to CHANGES
- some test suite fixes
Mike Bayer [Sat, 30 Jun 2007 02:04:05 +0000 (02:04 +0000)]
- finished moving all EagerLoader tests from mapper to eager_relations
- consolidated other eager tests into assorted_eager
- moved assertion objects into fixtures module
Mike Bayer [Sat, 30 Jun 2007 01:31:56 +0000 (01:31 +0000)]
- merged some tweaks to the pool overflow sync from trunk r2819
- merged vertical.py delete tests from trunk r2820, fixed collection
to new style collection
Jason Kirtland [Thu, 28 Jun 2007 20:04:52 +0000 (20:04 +0000)]
- OrderedDict shouldn't send None to update, never know who might be watching
(breaks use as a collection class)
- Update MapperExtension in byroot_tree example, finish updates for new
collections.
Jason Kirtland [Thu, 28 Jun 2007 17:42:34 +0000 (17:42 +0000)]
- Applied some safe collections optimizations and annotated a few key places
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
Jason Kirtland [Wed, 27 Jun 2007 21:08:14 +0000 (21:08 +0000)]
- Replaced collection api: The "InstrumentedList" proxy is replaced with
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.
Mike Bayer [Sun, 24 Jun 2007 19:58:41 +0000 (19:58 +0000)]
- merge of generative_sql branch
- 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
Jason Kirtland [Thu, 21 Jun 2007 21:01:04 +0000 (21:01 +0000)]
- expanded assignment test, ensure that re-assigning the value of
an association mutates the backing object (rather than a delete and
create with new primary keys)
Jason Kirtland [Sat, 16 Jun 2007 18:46:23 +0000 (18:46 +0000)]
- Eh, dummy_threading trick didn't actually work for no-op'ing overflow.
Works now, but less readable.
- Shaped the script from ticket #608 into a test case
Jason Kirtland [Fri, 15 Jun 2007 22:35:53 +0000 (22:35 +0000)]
- Added testbase.Table and testbase.Column, interceptors that can set up
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
Mike Bayer [Fri, 15 Jun 2007 16:51:25 +0000 (16:51 +0000)]
- added "explcit" create/drop/execute support for sequences
(i.e. you can pass a "connectable" to each of those methods
on Sequence)
- checkfirst flag propigates for sequence creates/drops
Mike Bayer [Thu, 14 Jun 2007 18:17:05 +0000 (18:17 +0000)]
- result sets from CRUD operations close their underlying cursor immediately.
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".
Mike Bayer [Mon, 11 Jun 2007 22:39:03 +0000 (22:39 +0000)]
- result.last_inserted_ids() should return a list that is identically
sized to the primary key constraint of the table. values that were
"passively" created and not available via cursor.lastrowid will be None.
Mike Bayer [Fri, 8 Jun 2007 02:12:36 +0000 (02:12 +0000)]
- added a third layer of inheritance to polymorph test
- 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)