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
Mike Bayer [Fri, 15 Apr 2011 03:44:03 +0000 (23:44 -0400)]
- fixed bug where "from" clause gathering from an
over() clause would be an itertools.chain() and
not a list, causing "can only concatenate list"
TypeError when combined with other clauses.
Mike Bayer [Wed, 13 Apr 2011 23:27:40 +0000 (19:27 -0400)]
- a "having" clause would be copied from the
inside to the outside query if from_self()
were used; in particular this would break
an 0.7 style count() query [ticket:2130].
(also in 0.6.7)
Mike Bayer [Mon, 11 Apr 2011 00:22:11 +0000 (20:22 -0400)]
- Added checks inside the UOW to detect the unusual
condition of being asked to UPDATE or DELETE
on a primary key value that contains NULL
in it. [ticket:2127]
- Some refinements to attribute history. More
changes are pending possibly in 0.8, but
for now history has been modified such that
scalar history doesn't have a "side effect"
of populating None for a non-present value.
This allows a slightly better ability to
distinguish between a None set and no actual
change, affects [ticket:2127] as well.
- rewriting the history tests in test_attributes to be
individual per operation/assertion. its a huge job
so this is partial for the moment.
Mike Bayer [Thu, 7 Apr 2011 21:56:01 +0000 (17:56 -0400)]
- Some fixes to the state handling regarding
backrefs, typically when autoflush=False, where
the back-referenced collection wouldn't
properly handle add/removes with no net
change. Thanks to Richard Murri for the
test case + patch. [ticket:2123]
(also in 0.6.7).
Mike Bayer [Thu, 7 Apr 2011 17:34:38 +0000 (13:34 -0400)]
- The limit/offset keywords to select() as well
as the value passed to select.limit()/offset()
will be coerced to integer. [ticket:2116]
(also in 0.6.7)
- Oracle dialect adds use_binds_for_limits=False
create_engine() flag, will render the LIMIT/OFFSET
values inline instead of as binds, reported to
modify the execution plan used by Oracle.
[ticket:2116] (Also in 0.6.7)