Mike Bayer [Sun, 28 Nov 2010 17:14:51 +0000 (12:14 -0500)]
- the names used in the NamedTuple returned by Query.__iter__()
will be transferred from the individual Query objects that compose
a union() or similar, as opposed to returning the "table_colname"
alias generated when subqueries are generated. [ticket:1942]
Mike Bayer [Sun, 28 Nov 2010 17:00:01 +0000 (12:00 -0500)]
- NullPool is now used by default for SQLite file-
based databases. :memory: databases will continue
to select SingletonThreadPool by default.
[ticket:1921]
Mike Bayer [Sun, 28 Nov 2010 16:52:24 +0000 (11:52 -0500)]
- post_process_text() is called for DDL() constructs, in particular allowing
'%' with only one level of escaping. Note this is backwards-incompatible
with previously triple-escaped sections. [ticket:1897]
Mike Bayer [Sat, 20 Nov 2010 22:57:30 +0000 (17:57 -0500)]
- fixes for PG, mysql, twophase
- added "pool_events" arg to create_engine(), "events" to pool, allowing
establishment of listeners which fire before those of the dialect
Mike Bayer [Sat, 20 Nov 2010 21:28:39 +0000 (16:28 -0500)]
- logging has been overhauled such that engines no longer need to encode the
"hex id" string in their logging name in order to maintain separate loggers
per engine. thanks to Vinay Sajip for assistance. merge of [ticket:1926]
Mike Bayer [Sat, 20 Nov 2010 21:25:12 +0000 (16:25 -0500)]
- the column assigned to polymorphic_on now behaves like any other
mapped attribute, in that it can be assigned to, mapped to multiple
columns. It is also populated immediately upon object construction
with its class-based value, so the attribute can be read before
any flush occurs. [ticket:1895]
Mike Bayer [Sat, 20 Nov 2010 20:43:12 +0000 (15:43 -0500)]
- bindparam() gets a new option "callable", which is a lambda or def
evaluated at execution time to determine the value. This replaces
the implicit recognition of callables sent as the primary value
of bindparam(), which was an undocumented behavior used by the ORM.
The argument is separated now so that values can be passed to
bindparams that are also callables without ambiguity, such
as user defined objects that include a __call__() method.
[ticket:1950]
Mike Bayer [Sat, 20 Nov 2010 20:28:18 +0000 (15:28 -0500)]
- add distinct tests for mapping to join with "exclude" prop versus "explicit",
should be the last thing needed for [ticket:1896], related to [ticket:1892]
Mike Bayer [Sat, 20 Nov 2010 19:52:21 +0000 (14:52 -0500)]
- the in-flush check for "pending orphan being flushed" has been removed.
It's now possible to issue INSERT for an object that would otherwise
be an orphan due to no parent object specified, along a relationship
that specifies "delete-orphan" cascade. The detection of this condition
as an error should now be accomplished via NOT NULL foreign keys.
[ticket:1912]
Mike Bayer [Sat, 20 Nov 2010 18:44:03 +0000 (13:44 -0500)]
- the ordering of columns in a multi-column property now is in
reverse order of which they were added to the property. A
typical effect of this is that the ".id" attribute on a
joined-inheritance subclass, where both parent/child tables
name the PK column ".id", will reference the ".id" column of
the child table, not the parent, thus allowing join conditions
and such to be constructed more intuitively. This is a
behavior change for some joined-table inheritance queries.
[ticket:1892]
- it's now an error condition to map to a join where multiple
same-named columns from each table combine themselves
implicitly. An explicit mention in the "properties" dictionary
should be specified, using a list of columns, or
column_property(*cols) with declarative. [ticket:1892]
Mike Bayer [Fri, 19 Nov 2010 23:44:09 +0000 (18:44 -0500)]
- active_history flag also added to composite().
The flag has no effect in 0.6, but is instead
a placeholder flag for forwards compatibility,
as it will be needed in 0.7 for composites.
[ticket:1976]
Mike Bayer [Thu, 18 Nov 2010 23:44:35 +0000 (18:44 -0500)]
- Added as_uuid=True flag to the UUID type, will receive
and return values as Python UUID() objects rather than
strings. Currently, the UUID type is only known to
work with psycopg2. [ticket:1956]
Mike Bayer [Thu, 18 Nov 2010 19:55:19 +0000 (14:55 -0500)]
- Added active_history flag to relationship()
and column_property(), forces attribute events to
always load the "old" value, so that it's available to
attributes.get_history(). [ticket:1961]
- modernize test_relationship, give test classes meaningful names
Mike Bayer [Thu, 18 Nov 2010 17:19:31 +0000 (12:19 -0500)]
- The cx_oracle "decimal detection" logic, which takes place
for for result set columns with ambiguous numeric characteristics,
now uses the decimal point character determined by the locale/
NLS_LANG setting, using an on-first-connect detection of
this character. cx_oracle 5.0.3 or greater is also required
when using a non-period-decimal-point NLS_LANG setting.
[ticket:1953].
Mike Bayer [Thu, 18 Nov 2010 00:34:47 +0000 (19:34 -0500)]
- establish a consistent pattern of behavior along o2m, m2m, and m2o relationships
when "save-update" cascade is disabled, or the target object is otherwise not
present in the session, and collection/scalar changes have taken place. A warning
is emitted describing the type of operation, the target reference, and the relationship
description, stating that the operation will not take place. The operation then doesn't
take place. [ticket:1973]
- clean up test_cascade a little bit, remove cruft
Mike Bayer [Sun, 14 Nov 2010 18:59:03 +0000 (13:59 -0500)]
- pool event tests that don't depend on deprecated listener system,
attempting "test just one thing" style
- reorganize fixtures to come primarily from the base test class
Mike Bayer [Sat, 13 Nov 2010 18:19:36 +0000 (13:19 -0500)]
- move inline "import" statements to use new "util.importlater()" construct. cuts
down on clutter, timeit says there's a teeny performance gain, at least where
the access is compared against attr.subattr. these aren't super-critical
calls anyway
- slight inlining in _class_to_mapper
Mike Bayer [Fri, 12 Nov 2010 15:49:17 +0000 (10:49 -0500)]
- On the same theme, the REFERENCES clause in a CREATE TABLE
that includes a remote schema to a *different* schema
than that of the parent table doesn't render at all,
as cross-schema references do not appear to be supported.
Mike Bayer [Fri, 12 Nov 2010 15:36:03 +0000 (10:36 -0500)]
- The REFERENCES clause in a CREATE TABLE that includes
a remote schema name now renders the remote name without
the schema clause, as required by SQLite. [ticket:1851]
Mike Bayer [Thu, 11 Nov 2010 00:00:28 +0000 (19:00 -0500)]
- move deprecated interfaces down to bottom of TOC, update verbiage
- more docs for engine, pool, DDL events
- update DDL sequences documentation to use events
- update DDL() docstring to refer to execute_if()
- document parameters for DDLElement.execute_if()
- add retval=True flag to Engine.on_before_execute(), on_before_cursor_execute().
wrap the function if retval=False, check for appropriate usage of the flag, add
tests.
- remove ScopedSession.mapper and tests entirely
- remove ExtensionCarrier and tests
- change remaining tests that use MapperExtension to use MapperEvents
Mike Bayer [Tue, 9 Nov 2010 16:40:23 +0000 (11:40 -0500)]
- Implemented sequence check capability for the C
version of RowProxy, as well as 2.7 style
"collections.Sequence" registration for RowProxy.
[ticket:1871]
Mike Bayer [Sun, 7 Nov 2010 17:49:48 +0000 (12:49 -0500)]
- propagate flag on event.listen() results in the listener being placed
in a separate collection. this collection also propagates during update()
- ClassManager now handles bases, subclasses collections.
- ClassManager looks at __bases__ instead of __mro__ for superclasses.
It's assumed ClassManagers are in an unbroken chain upwards through __mro__.
- trying to get a clear() that makes sense on cls.dispatch
- implemented propagate for attribute events, plus permutation-based test
- implemented propagate for mapper / instance events with rudimentary test
- some pool events tests are failing for some reason
Mike Bayer [Fri, 5 Nov 2010 05:02:48 +0000 (01:02 -0400)]
- "innerjoin" flag doesn't take effect along the chain
of joinedload() joins if a previous join in that chain
is an outer join, thus allowing primary rows without
a referenced child row to be correctly returned
in results. [ticket:1954]
Mike Bayer [Wed, 3 Nov 2010 19:45:21 +0000 (15:45 -0400)]
- mysql
- Fixed error handling for Jython + zxjdbc, such that
has_table() property works again. Regression from
0.6.3 (we don't have a Jython buildbot, sorry)
[ticket:1960]
Mike Bayer [Tue, 26 Oct 2010 20:12:04 +0000 (16:12 -0400)]
- Fixed bug whereby a non-"mutable" attribute modified event
which occurred on an object that was clean except for
preceding mutable attribute changes would fail to strongly
reference itself in the identity map. This would cause the
object to be garbage collected, losing track of any changes
that weren't previously saved in the "mutable changes"
dictionary.
Mike Bayer [Sun, 24 Oct 2010 16:00:58 +0000 (12:00 -0400)]
- mssql+pymssql dialect now honors the "port" portion
of the URL instead of discarding it. [ticket:1952]
- testing.only_on() accepts db specs optionally as a list
Mike Bayer [Sat, 23 Oct 2010 22:09:36 +0000 (18:09 -0400)]
- Rewrote the reflection of indexes to use sys.
catalogs, so that column names of any configuration
(spaces, embedded commas, etc.) can be reflected.
Note that reflection of indexes requires SQL
Server 2005 or greater. [ticket:1770]
Mike Bayer [Sat, 23 Oct 2010 20:40:39 +0000 (16:40 -0400)]
- Added type_coerce(expr, type_) expression element.
Treats the given expression as the given type when evaluating
expressions and processing result rows, but does not
affect the generation of SQL, other than an anonymous label.