Mike Bayer [Sun, 5 Jun 2011 00:04:29 +0000 (20:04 -0400)]
- Modify the text of the message which occurs
when the "identity" key isn't detected on
flush, to include the common cause that
the Column isn't set up to detect
auto-increment correctly; [ticket:2170].
Also in 0.6.8.
Mike Bayer [Sat, 4 Jun 2011 23:53:24 +0000 (19:53 -0400)]
- Accept None from SQLite cursor.fetchone() when
"PRAGMA read_uncommitted" is called to determine
current isolation mode at connect time and
default to SERIALIZABLE; this to support SQLite
versions pre-3.3.0 that did not have this
feature. [ticket:2173]
Mike Bayer [Sat, 4 Jun 2011 23:43:39 +0000 (19:43 -0400)]
- Repaired new "mutable" extension to propagate
events to subclasses correctly; don't
create multiple event listeners for
subclasses either. [ticket:2180]
Mike Bayer [Sat, 4 Jun 2011 23:01:52 +0000 (19:01 -0400)]
- "delete-orphan" cascade is now allowed on
self-referential relationships - this since
SQLA 0.7 no longer enforces "parent with no
child" at the ORM level; this check is left
up to foreign key nullability.
Related to [ticket:1912]
- a lot of cleanup and refactoring on relationship()
init, clarification
Mike Bayer [Thu, 2 Jun 2011 23:52:26 +0000 (19:52 -0400)]
- Unit tests pass 100% on MySQL installed
on windows, after aggressive exclusion of a wide variety
of tests. Not clear to what degree the failures are related to
version 5.5 vs. the usage of windows, in particular the ON UPDATE CASCADE
immediately crashes the server. The features being tested here are all
edge cases not likely to be used in typical MySQL environments.
- Removed the "adjust casing" step that would
fail when reflecting a table on MySQL
on windows with a mixed case name. After some
experimenting with a windows MySQL server, it's
been determined that this step wasn't really
helping the situation much; MySQL does not return
FK names with proper casing on non-windows
platforms either, and removing the step at
least allows the reflection to act more like
it does on other OSes. A warning here
has been considered but its difficult to
determine under what conditions such a warning
can be raised, so punted on that for now -
added some docs instead. [ticket:2181]
- supports_sane_rowcount will be set to False
if using MySQLdb and the DBAPI doesn't provide
the constants.CLIENT module.
Mike Bayer [Thu, 2 Jun 2011 06:52:40 +0000 (02:52 -0400)]
- Deprecate schema/SQL-oriented methods on
Connection/Engine that were never well known
and are redundant: reflecttable(), create(),
drop(), text(), engine.func
- lots of docstrings in engine
Mike Bayer [Thu, 2 Jun 2011 00:25:33 +0000 (20:25 -0400)]
take out a little cruft. Spend two hours trying to make things simpler,
maybe we dont need state.callables (nope we do), maybe we can move populate_state out
(nope we lose speed that way), things are the way they are...
Mike Bayer [Sun, 29 May 2011 00:24:57 +0000 (20:24 -0400)]
- move Operators and ColumnOperators into sqlalchemy.sql.operators - since this
is strictly a system of routing Python operators into functions. Keep the
references available in expression.py for the near future.
Mike Bayer [Sat, 28 May 2011 17:28:38 +0000 (13:28 -0400)]
- Streamlined the process by which a Select
determines what's in it's '.c' collection.
Behaves identically, except that a
raw ClauseList() passed to select([])
(which is not a documented case anyway) will
now be expanded into its individual column
elements instead of being ignored.
Mike Bayer [Fri, 20 May 2011 18:43:06 +0000 (14:43 -0400)]
- Fixed bug whereby mapper mapped to an anonymous
alias would fail if logging were used, due to
unescaped % sign in the alias name. [ticket:2171]
Also in 0.6.8.
Mike Bayer [Thu, 19 May 2011 16:00:47 +0000 (12:00 -0400)]
- Fixed bug in MSSQL dialect whereby the aliasing
applied to a schema-qualified table would leak
into enclosing select statements [ticket:2169].
Also in 0.6.8.
Mike Bayer [Wed, 18 May 2011 16:07:40 +0000 (12:07 -0400)]
- Fixed bug whereby nesting a label of a select()
with another label in it would produce incorrect
exported columns. Among other things this would
break an ORM column_property() mapping against
another column_property(). [ticket:2167].
Also in 0.6.8
- _Label() is always against a column or selectable. remove
uncovered case of label against something else.
- start taking notes to clean up some of this labeling stuff,
which will be [ticket:2168]
Mike Bayer [Sat, 14 May 2011 17:34:29 +0000 (13:34 -0400)]
- make sure we definitely get every connection created
- ensure we lose self.conns, cx_oracle only closes on __del__
- fix reconnectingfixture to lose all connection references
Mike Bayer [Sat, 14 May 2011 14:23:12 +0000 (10:23 -0400)]
- Fixed bugs in sqlalchemy.ext.mutable extension where
`None` was not appropriately handled, replacement
events were not appropriately handled.
[ticket:2143]
Mike Bayer [Thu, 12 May 2011 16:47:09 +0000 (12:47 -0400)]
- polymorphic_union() gets a "cast_nulls" option,
disables the usage of CAST when it renders
the labeled NULL columns. [ticket:1502]
- polymorphic_union() renders the columns in their
original table order, as according to the first
table/selectable in the list of polymorphic
unions in which they appear. (which is itself
an unordered mapping unless you pass an OrderedDict).
Mike Bayer [Tue, 10 May 2011 00:40:33 +0000 (20:40 -0400)]
- given that Oracle's issue is not just open connections, but *closed* ones too, go really
heavy handed and start marking tests as "requires.ad_hoc_engines", add a flag --low-connections
that will switch the engine reaper mechanism to use as *few* distinct engines and connections
as possible, many engine tests that really need their own engines are just skipped.
Mike Bayer [Sat, 7 May 2011 16:52:25 +0000 (12:52 -0400)]
- Changed the handling in determination of join
conditions such that foreign key errors are
only considered between the two given tables.
That is, t1.join(t2) will report FK errors
that involve 't1' or 't2', but anything
involving 't3' will be skipped. This affects
join(), as well as ORM relationship and
inherit condition logic. Will keep the more conservative
approach to [ticket:2153] in 0.6.
Mike Bayer [Sat, 7 May 2011 15:52:14 +0000 (11:52 -0400)]
- mapper() will ignore non-configured foreign keys
to unrelated tables when determining inherit
condition between parent and child class.
This is equivalent to behavior already
applied to declarative. [ticket:2153]
Also in 0.6.8.
Mike Bayer [Sat, 7 May 2011 15:26:00 +0000 (11:26 -0400)]
- Fixed bug where determination of "self referential"
relationship would fail with no workaround
for joined-inh subclass related to itself,
or joined-inh subclass related to a subclass
of that with no cols in the sub-sub class
in the join condition. [ticket:2149]
Also in 0.6.8.
Mike Bayer [Sat, 7 May 2011 15:15:36 +0000 (11:15 -0400)]
- Fixed the error message emitted for "can't
execute syncrule for destination column 'q';
mapper 'X' does not map this column" to
reference the correct mapper. [ticket:2163].
Also in 0.6.8.
- test/orm/test_sync.py covers orm/sync.py 100%
Mike Bayer [Sat, 30 Apr 2011 18:43:03 +0000 (14:43 -0400)]
- rework of Query._adapt_clause to support [ticket:2155],
be clearer in its intent.
- Fine tuning of Query clause adaptation when
from_self(), union(), or other "select from
myself" operation, such that plain SQL expression
elements added to filter(), order_by() etc.
which are present in the nested "from myself"
query *will* be adapted in the same way an ORM
expression element will, since these
elements are otherwise not easily accessible.
[ticket:2155]
Mike Bayer [Thu, 28 Apr 2011 16:10:24 +0000 (12:10 -0400)]
- Removed the usage of the "collections.MutableMapping"
abc from the ext.mutable docs as it was being used
incorrectly and makes the example more difficult
to understand in any case. [ticket:2152]
Mike Bayer [Thu, 28 Apr 2011 02:33:37 +0000 (22:33 -0400)]
- removed the ancient "polymorphic association"
examples and replaced with an updated set of
examples that use declarative mixins,
"generic_associations". Each presents an alternative
table layout.
Mike Bayer [Wed, 27 Apr 2011 16:54:15 +0000 (12:54 -0400)]
- a non_primary mapper will inherit the _identity_class
of the primary mapper. This so that a non_primary
established against a class that's normally in an
inheritance mapping will produce results that are
identity-map compatible with that of the primary
mapper [ticket:2151] (also in 0.6.8)
Mike Bayer [Tue, 26 Apr 2011 01:50:26 +0000 (21:50 -0400)]
- hardcore force every connection into a strong-referenced set, rollback on every test, close on every context.
this uses pool events but bypasses the pool's fairy/record/dispose services. pypy still seems to expose
some holes in that at least as far as what some (or maybe just one, cant find it yet) of the tests does.
haven't tested this too deeply, just on sqlite + postgres, cypthon 2.7 + pypy. will see what the buildbot
says
Mike Bayer [Sat, 23 Apr 2011 17:45:11 +0000 (10:45 -0700)]
- metadata.reflect() and reflection.Inspector()
had some reliance on GC to close connections
which were internally procured, fixed this.
- added --zero-timeout option to nose fixture, sets pool_timeout to zero
Mike Bayer [Sat, 23 Apr 2011 16:34:17 +0000 (12:34 -0400)]
- Fixed bug whereby if FetchedValue was passed
to column server_onupdate, it would not
have its parent "column" assigned, added
test coverage for all column default assignment
patterns. [ticket:2147] also in 0.6.8
Mike Bayer [Fri, 22 Apr 2011 22:33:55 +0000 (18:33 -0400)]
- It is an error to call query.get() when the
given entity is not a single, full class
entity or mapper (i.e. a column). This is
a deprecation warning in 0.6.8.
[ticket:2144]
Mike Bayer [Mon, 18 Apr 2011 01:03:02 +0000 (21:03 -0400)]
- Fixed regression introduced in 0.7b4 (!) whereby
query.options(someoption("nonexistent name")) would
fail to raise an error. Also added additional
error catching for cases where the option would
try to build off a column-based element, further
fixed up some of the error messages tailored
in [ticket:2069]
- added another huge crapload of tests to the existing
crapload of tests we already had for options..._get_paths()
and dependencies are covered 100% now
- one case still doesn't do the "right" thing, using an option
specific to relationships will silently pass if the endpoint
is a column-based attribute, and vice versa.
Mike Bayer [Sun, 17 Apr 2011 20:10:59 +0000 (16:10 -0400)]
- move documentation of available execution options to Connection - this is the main
place these should be used
- Executable disallows "compiled_cache" option for now which was previously being ignored
[ticket:2131]
- Query now passes execution options to the Connection rather than the statement
so that all options are allowed including compiled cache.
Mike Bayer [Sun, 17 Apr 2011 19:37:12 +0000 (15:37 -0400)]
- Added explicit true()/false() constructs to expression
lib - coercion rules will intercept "False"/"True"
into these constructs. In 0.6, the constructs were
typically converted straight to string, which was
no longer accepted in 0.7. [ticket:2117]
Mike Bayer [Sun, 17 Apr 2011 17:22:33 +0000 (13:22 -0400)]
- rework setup.py script to work with:
- Python 3
- Python 3 builds if Distribute isn't installed
- rework install documentation again
- raise if doc build with mako < 0.4.1
- Python 3.1 builds force doctest parse but then fails due to distribute bug,
so remove usage of backslash \\ in hybrid.py docstring
- put in the latest ez_setup.py