Mike Bayer [Sat, 6 Oct 2012 16:46:02 +0000 (12:46 -0400)]
- [bug] Continuing [ticket:2566] regarding extra
state post-flush due to event listeners;
any states that are marked as "dirty" from an
attribute perspective, usually via column-attribute
set events within after_insert(), after_update(),
etc., will get the "history" flag reset
in all cases, instead of only those instances
that were part of the flush. This has the effect
that this "dirty" state doesn't carry over
after the flush and won't result in UPDATE
statements. A warning is emitted to this
effect; the set_committed_state()
method can be used to assign attributes on objects
without producing history events. [ticket:2582]
Mike Bayer [Thu, 4 Oct 2012 22:26:55 +0000 (18:26 -0400)]
- add back __engine_options__
- break test_insert tests into explicitly get_lastrowid() vs. implicit_returning tests,
fix up requirements to split them out
Mike Bayer [Thu, 4 Oct 2012 21:36:02 +0000 (17:36 -0400)]
- don't call get_lastrowid() on explicit returning
- don't hardwire "subqueries" requirement in the base, mysql < 4.1 isn't working anyway
- don't need explicit FB/PG exclusions in test_returning
- hit db.connect() for the returning requirement
Mike Bayer [Thu, 4 Oct 2012 17:50:36 +0000 (13:50 -0400)]
- [feature] The Session will produce warnings
when unsupported methods are used inside the
"execute" portion of the flush. These are
the familiar methods add(), delete(), etc.
as well as collection and related-object
manipulations, as called within mapper-level
flush events
like after_insert(), after_update(), etc.
It's been prominently documented for a long
time that SQLAlchemy cannot guarantee
results when the Session is manipulated within
the execution of the flush plan,
however users are still doing it, so now
there's a warning. Maybe someday the Session
will be enhanced to support these operations
inside of the flush, but for now, results
can't be guaranteed.
Mike Bayer [Wed, 3 Oct 2012 14:52:14 +0000 (10:52 -0400)]
- [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
if the replaced primary key were established either
via non-unitofwork-established INSERT statement
or by primary key switch of another instance.
[ticket:2583]
Mike Bayer [Mon, 1 Oct 2012 05:59:59 +0000 (01:59 -0400)]
- fix the fixture here that wasn't creating consistently
- rewrite --dropfirst to be more industrial strength, includes views
- fix order_by="foreign_key" to maintain the same ordering as
metadata.sorted_tables. Not ideal that this was the other way throughout
0.7 but this is still a little-used method, in contrast to metadata.sorted_tables.
Mike Bayer [Mon, 1 Oct 2012 00:17:49 +0000 (20:17 -0400)]
- [feature] the MS Access dialect has been
moved to its own project on Bitbucket,
taking advantage of the new SQLAlchemy
dialect compliance suite. The dialect is
still in very rough shape and probably not
ready for general use yet, however
it does have *extremely* rudimental
functionality now.
Mike Bayer [Sun, 30 Sep 2012 22:23:21 +0000 (18:23 -0400)]
mssql: - [bug] Fixed bug where reflection of primary key constraint
would double up columns if the same constraint/table
existed in multiple schemas.
- force returns_rows to False for inserts where we know rows shouldnt be returned;
allows post_exec() to use the cursor without issue
Mike Bayer [Sun, 30 Sep 2012 21:18:14 +0000 (17:18 -0400)]
- [bug] Fixed bug in over() construct whereby
passing an empty list for either partition_by
or order_by, as opposed to None, would fail
to generate correctly.
Courtesy Gunnlaugur Por Briem.
[ticket:2574]
Mike Bayer [Sun, 30 Sep 2012 20:57:23 +0000 (16:57 -0400)]
- [bug] Fixed compiler bug whereby using a correlated
subquery within an ORDER BY would fail to render correctly
if the stament also used LIMIT/OFFSET, due to mis-rendering
within the ROW_NUMBER() OVER clause. Fix courtesy
sayap [ticket:2538]
Mike Bayer [Sun, 30 Sep 2012 20:00:46 +0000 (20:00 +0000)]
- [bug] The CreateIndex construct in Oracle
will now schema-qualify the name of the index
to be that of the parent table. Previously this
name was omitted which apparently creates the
index in the default schema, rather than that
of the table.
Mike Bayer [Sat, 29 Sep 2012 17:21:15 +0000 (13:21 -0400)]
- revert the "basedir" thing - running setup.py from the currdir is unfortunately part of the
distutils docs (http://docs.python.org/install/index.html#platform-variations)
Mike Bayer [Thu, 27 Sep 2012 06:37:33 +0000 (02:37 -0400)]
trying different approaches to test layout. in this one, the testing modules
become an externally usable package but still remains within the main sqlalchemy parent package.
in this system, we use kind of an ugly hack to get the noseplugin imported outside of the
"sqlalchemy" package, while still making it available within sqlalchemy for usage by
third party libraries.
Mike Bayer [Wed, 26 Sep 2012 21:21:21 +0000 (17:21 -0400)]
- further reorganization of test suite:
- bootstrap and lib move to all absolute imports
- testing.py is no longer internally referenced.
- requirements move to be a pluggable class which can
be overridden.
- cleanup
in the interests of third party testing, test/lib and test/bootstrap
may move to be an independent package.
Mike Bayer [Tue, 25 Sep 2012 20:54:50 +0000 (16:54 -0400)]
- [bug] Added 'terminating connection' to the list
of messages we use to detect a disconnect with PG, which
appears to be present in some versions when the server
is restarted. [ticket:2570]
Mike Bayer [Sun, 23 Sep 2012 22:09:18 +0000 (18:09 -0400)]
- got firebird running
- add some failure cases
- [bug] Firebird now uses strict "ansi bind rules"
so that bound parameters don't render in the
columns clause of a statement - they render
literally instead.
- [bug] Support for passing datetime as date when
using the DateTime type with Firebird; other
dialects support this.
Mike Bayer [Sun, 23 Sep 2012 17:42:24 +0000 (13:42 -0400)]
- [bug] Columns in reflected primary key constraint
are now returned in the order in which the constraint
itself defines them, rather than how the table
orders them. Courtesy Gunnlaugur Por Briem.
[ticket:2531].
Mike Bayer [Sun, 23 Sep 2012 16:51:24 +0000 (12:51 -0400)]
- [bug] When the primary key column of a Table
is replaced, such as via extend_existing,
the "auto increment" column used by insert()
constructs is reset. Previously it would
remain referring to the previous primary
key column. [ticket:2525]
Mike Bayer [Sun, 23 Sep 2012 16:42:38 +0000 (12:42 -0400)]
- [feature] An explicit error is raised when
a ForeignKeyConstraint() that was
constructed to refer to multiple remote tables
is first used. [ticket:2455]
Mike Bayer [Sun, 23 Sep 2012 15:30:07 +0000 (11:30 -0400)]
- [bug] Adjusted column default reflection code to
convert non-string values to string, to accommodate
old SQLite versions that don't deliver
default info as a string. [ticket:2265]
- factor sqlite column reflection to be like we did for postgresql,
in a separate method.
Mike Bayer [Sat, 22 Sep 2012 20:48:49 +0000 (16:48 -0400)]
- [bug] A tweak to column precedence which moves the
"concat" and "match" operators to be the same as
that of "is", "like", and others; this helps with
parenthesization rendering when used in conjunction
with "IS". [ticket:2564]
Mike Bayer [Sat, 22 Sep 2012 20:14:58 +0000 (16:14 -0400)]
- [bug] Added missing operators is_(), isnot()
to the ColumnOperators base, so that these long-available
operators are present as methods like all
the other operators. [ticket:2544]
Mike Bayer [Sat, 22 Sep 2012 20:03:57 +0000 (16:03 -0400)]
- [bug] Extra logic has been added to the "flush"
that occurs within Session.commit(), such that the
extra state added by an after_flush() or
after_flush_postexec() hook is also flushed in a
subsequent flush, before the "commit" completes.
Subsequent calls to flush() will continue until
the after_flush hooks stop adding new state.
An "overflow" counter of 100 is also in place,
in the event of a broken after_flush() hook
adding new content each time. [ticket:2566]
Mike Bayer [Thu, 20 Sep 2012 22:39:27 +0000 (18:39 -0400)]
- [feature] New session events after_transaction_create
and after_transaction_end
allows tracking of new SessionTransaction objects.
If the object is inspected, can be used to determine
when a session first becomes active and when
it deactivates.
Mike Bayer [Wed, 19 Sep 2012 04:34:30 +0000 (00:34 -0400)]
- [bug] Adjusted a very old bugfix which attempted
to work around a SQLite issue that itself was
"fixed" as of sqlite 3.6.14, regarding quotes
surrounding a table name when using
the "foreign_key_list" pragma. The fix has been
adjusted to not interfere with quotes that
are *actually in the name* of a column or table,
to as much a degree as possible; sqlite still
doesn't return the correct result for foreign_key_list()
if the target table actually has quotes surrounding
its name, as *part* of its name (i.e. """mytable""").
[ticket:2568]
Mike Bayer [Mon, 17 Sep 2012 01:15:55 +0000 (21:15 -0400)]
- [bug] Fixed bug where incorrect type information
would be passed when the ORM would bind the
"version" column, when using the "version" feature.
Tests courtesy Daniel Miller. [ticket:2539]
Mike Bayer [Sun, 16 Sep 2012 21:43:21 +0000 (17:43 -0400)]
- genericize the test for ischema_names
- some fixes to the patch to handle empty args, whitespace
- changelog clarifies where this API fits at the moment
Mike Bayer [Sat, 15 Sep 2012 01:58:19 +0000 (21:58 -0400)]
- [bug] Fixed a disconnect that slowly evolved
between a @declared_attr Column and a
directly-defined Column on a mixin. In both
cases, the Column will be applied to the
declared class' table, but not to that of a
joined inheritance subclass. Previously,
the directly-defined Column would be placed
on both the base and the sub table, which isn't
typically what's desired. [ticket:2565]
Mike Bayer [Mon, 10 Sep 2012 16:58:11 +0000 (12:58 -0400)]
- [feature] The cast() and extract() constructs
will now be produced via the func.* accessor
as well, as users naturally try to access these
names from func.* they might as well do
what's expected, even though the returned
object is not a FunctionElement.
[ticket:2562]
Mike Bayer [Sun, 9 Sep 2012 18:39:25 +0000 (14:39 -0400)]
- [feature] Added a hook to the system of rendering
CREATE TABLE that provides access to the render for each
Column individually, by constructing a @compiles
function against the new schema.CreateColumn
construct. [ticket:2463]