Mike Bayer [Wed, 18 Jul 2007 21:00:14 +0000 (21:00 +0000)]
- unittest cleanup: after removal of threadlocal mod + changes to session calling signature,
got sqlite, postgres, mysql all working again (one unresolved failure for mysql)
Mike Bayer [Tue, 17 Jul 2007 22:38:54 +0000 (22:38 +0000)]
- changed the order of args to session.execute(), session.scalar()
- removed session.connect(). theres only connection()
- implemented twophase flag on session, twophase calls within SessionTransaction,
one unit test so far which tests that it succeeds (but doesnt test a failure yet or
do any mocking)
- rewrote session transaction docs
Mike Bayer [Tue, 17 Jul 2007 20:38:57 +0000 (20:38 +0000)]
- removed ancient threadlocal/legacy_session mods
- Session now has tranasaction API built into it, SessionTransaction not part of the usual API now (but still does the work)
- integrated nested transactions/SAVEPOINT with Session transactional system
- Session gets "transactional" mode, it always begins a transaction and reopens after commit/rollback
- Session gets "autoflush=True" flag, implies "transactional", issues a flush before the execution of every
query so that query results include whatever is currently in the session
- various unit test fixes
Mike Bayer [Tue, 17 Jul 2007 04:54:30 +0000 (04:54 +0000)]
- got in_() working, enhanced sql.py treatment of Comparator so comparators can be used in any SQL expression (i.e. order bys, desc(), etc.)
- adding various tests for new clause generation
Mike Bayer [Tue, 17 Jul 2007 04:25:09 +0000 (04:25 +0000)]
- added operator support to class-instrumented attributes. you can now
filter() (or whatever) using <classname>.<attributename>==<whatever>.
for column based properties, all column operators work (i.e. ==, <, >,
like(), in_(), etc.). For relation() and composite column properties,
==<instance>, !=<instance>, and ==<None> are implemented so far.
[ticket:643]
Mike Bayer [Tue, 17 Jul 2007 01:14:33 +0000 (01:14 +0000)]
- moved query._with_parent into prop.compare() calls
- built extensible operator framework in sql package, ORM
builds on top of it to shuttle python operator objects back down
to the individual columns. no relation() comparisons yet. implements
half of [ticket:643]
Jason Kirtland [Tue, 17 Jul 2007 00:41:45 +0000 (00:41 +0000)]
- Finish collections doc changes started in r2839, expanding coverage in
main documentation and docstrings.
- Per list discussion, removed backward compat. for dict- and object-derived
collection types. This is the safest course of action given the major
change in dict iterator behavior.
- Minor typos and code cleanups.
Mike Bayer [Mon, 16 Jul 2007 18:55:05 +0000 (18:55 +0000)]
- converted all anonymous labels and aliases to be generated within the compilation phase. this allows fully "deterministic" label generation. theres a couple of unit test failures that need to be fixed but most are passing.
- also some tweaks to unicode result column names; no longer chopping out characters from the names, since the name might be composed of all non-ascii characters. mysql needs some work here since its returning, i think, the unicode's internally-encoded bytes directly within a bytestring.
- need to simplify the amount of dictionaries present in ANSICompiler, its pretty hard to follow at this point.
Mike Bayer [Thu, 12 Jul 2007 18:34:48 +0000 (18:34 +0000)]
added some order_bys to eager relations, which otherwise load with different
ordering on PG. we might want to get eager relations on m2m to handle default order-by differently
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.