Mike Bayer [Sat, 24 Nov 2012 21:14:58 +0000 (16:14 -0500)]
Added a new exception to detect the case where two
subclasses are being loaded using with_polymorphic(),
each subclass contains a relationship attribute of the same
name, and eager loading is being applied to one or both.
This is an ongoing bug which can't be immediately fixed,
so since the results are usually wrong in any case it raises an
exception for now. 0.7 has the same issue, so an exception
raise here probably means the code was returning the wrong
data in 0.7. [ticket:2614]
Mike Bayer [Sat, 24 Nov 2012 00:32:41 +0000 (19:32 -0500)]
- adjust this test for the ugly reality of the "name normalize" backends, where because we've decided
that "lowercase" is the case insensitive casing, we can't distinguish between case insensitive/not
on a database that returns case-insensitive names as UPPERCASE, for names that are UPPERCASE.
[ticket:2615]
Mike Bayer [Fri, 23 Nov 2012 04:45:24 +0000 (23:45 -0500)]
- recognize that do_rollback() and do_commit() work with a DBAPI connection,
whereas the other do_rollback_twophase(), savepoint etc. work with
:class:`.Connection`. the context on these are different as twophase/savepoint
are available at the :class:`.Connection` level, whereas commit/rollback are needed
at a lower level as well. Rename the argument to "dbapi_connection" when the conneciton
is in fact the DBAPI interface.
- start thinking about being able to track "autocommit" vs. "commit", but not sure
we have a need for this yet.
- have Pool call out to a Dialect for all rollback/commit/close operations now. Pool
no longer calls DBAPI methods directly. May use this for a workaround for [ticket:2611]
- add a new Pool event reset() to allow the pool's reset of the connection to be intercepted.
- remove methods in Informix dialect which appear to be hardcoding some isolation
settings on new Transaction only; the isolation API should be implemented for Informix.
also removed "flag" for transaction commit/rollback being not available; this should
be based on server/DBAPI version and we will need someone with test access in order
to help determine how this should work
Diana Clarke [Thu, 22 Nov 2012 18:20:20 +0000 (13:20 -0500)]
second pass: increasing coverage, and commenting the "why" certain things are being tested (when I know) b/c it wasn't initially clear to me why case was being toggled everywhere, etc.
Mike Bayer [Sun, 18 Nov 2012 15:38:02 +0000 (10:38 -0500)]
Fixed a gotcha where inadvertently calling list() on a
:class:`.ColumnElement` would go into an endless loop, if
:meth:`.ColumnOperators.__getitem__` were implemented.
A new NotImplementedError is emitted via ``__iter__()``.
Mike Bayer [Sat, 17 Nov 2012 23:53:23 +0000 (18:53 -0500)]
Merged in audriusk/sqlalchemy_pg_hstore (pull request #26). will adjust some aspects of it, including replace userdefinedtype with typeengine, and move mutationdict to be part of sqlalchemy.ext.mutable
Diana Clarke [Sat, 17 Nov 2012 20:28:50 +0000 (15:28 -0500)]
initializing _labels to an empty list so that the other methods don't throw exceptions in the None labels case, but rather return (), [], or {}. this is not backwards compatible, but doubt anyone is relying on those exceptions #2601
Mike Bayer [Wed, 14 Nov 2012 06:18:58 +0000 (01:18 -0500)]
The :meth:`.Connection.connect` and :meth:`.Connection.contextual_connect`
methods now return a "branched" version so that the :meth:`.Connection.close`
method can be called on the returned connection without affecting the
original. Allows symmetry when using :class:`.Engine` and
:class:`.Connection` objects as context managers.
Mike Bayer [Wed, 14 Nov 2012 05:52:31 +0000 (00:52 -0500)]
Fixed :meth:`.MetaData.reflect` to correctly use
the given :class:`.Connection`, if given, without
opening a second connection from that connection's
:class:`.Engine`. [ticket:2604]
Mike Bayer [Wed, 14 Nov 2012 04:43:31 +0000 (23:43 -0500)]
Fixed bug whereby using "key" with Column
in conjunction with "schema" for the owning
Table would fail to locate result rows due
to the MSSQL dialect's "schema rendering"
logic's failure to take .key into account.
Also in 0.7.10. [ticket:2607]
Mike Bayer [Mon, 12 Nov 2012 20:48:40 +0000 (15:48 -0500)]
Fixed bug in type_coerce() whereby typing information
could be lost if the statement were used as a subquery
inside of another statement, as well as other similar
situations. Among other things, would cause
typing information to be lost when the Oracle/mssql dialects
would apply limit/offset wrappings. [ticket:2603]
Mike Bayer [Mon, 12 Nov 2012 19:30:18 +0000 (14:30 -0500)]
- support "fails_if" requirements as __requires__; so far this just skips, doesn't
actually run the test
- add requirements for date/datetime/time capabilities
- remove test/sql/test_types->DateTest and create new tests in suite/test_types
- move the StringTest with the "no length create" test to the suite, though this is a
weird test
Mike Bayer [Mon, 12 Nov 2012 17:44:42 +0000 (12:44 -0500)]
Fixed regression where query.update() would produce
an error if an object matched by the "fetch"
synchronization strategy wasn't locally present.
Courtesy Scott Torborg. [ticket:2602]
Mike Bayer [Wed, 31 Oct 2012 18:30:47 +0000 (14:30 -0400)]
Fixed bug whereby the ".key" of a Column wasn't being
used when producing a "proxy" of the column against
a selectable. This probably didn't occur in 0.7
since 0.7 doesn't respect the ".key" in a wider
range of scenarios. [ticket:2597]
Added missing types supported by Sybase to ischema_names mapping
Created a SybaseInspector similar to the PGInspector, with a cached table_id
lookup, and added it to the SybaseDialect as the default inspector.
Added the following methods to SybaseDialect:
get_table_id
get_columns
_get_column_info : support method for get_columns
get_foreign_keys
get_indexes
get_pk_constraint
get_schema_names
get_view_definition
get_view_names
Rewrote the following methods to conform to the style of the rest:
get_table_names
has_table
Reordered colspec builder to put default clause after "NULL/NOT NULL",
instead of before. This fixed a syntax error.
Mike Bayer [Sun, 28 Oct 2012 23:07:56 +0000 (19:07 -0400)]
- do a straight __subclasses__ traversal here, so that we aren't
iterating through all mappers in memory when a new event is tacked
onto an unmapped superclass, also removes the strong ref that was
breaking some GC teardown tests
Mike Bayer [Sun, 28 Oct 2012 18:15:56 +0000 (14:15 -0400)]
- store only MultipleClassMarkers inside of ModuleMarker, then
store ModuleMarkers for multiple roots, one for each token in a
module path. this allows partial path resolution.
- docs to this effect
Mike Bayer [Fri, 26 Oct 2012 23:25:23 +0000 (19:25 -0400)]
- add class_ to AliasedInsp
- redefine inspect(Class.attrname).parent to be always an inspectable
target; either Mapper or AliasedInsp
- add most major features to 08 migration, document, link