]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Work w/ prefetch even for selects, if present
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Jul 2016 20:38:22 +0000 (16:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Jul 2016 20:43:49 +0000 (16:43 -0400)
commite486ef666f39f136c770c68db28f475d68e0173f
tree72e3b82fb30391c93912295a58cf1ac3f37f05c5
parent6dd795bda03777cd2c04bfc6b9d98858c353801d
Work w/ prefetch even for selects, if present

Fixed bug in new CTE feature for update/insert/delete stated
as a CTE inside of an enclosing statement (typically SELECT) whereby
oninsert and onupdate values weren't called upon for the embedded
statement.

This is accomplished by consulting prefetch
for all statements.  The collection is also broken into
separate insert/update collections so that we don't need to
consult toplevel self.isinsert to determine if the prefetch
is for an insert or an update.  What we don't yet test for
are CTE combinations that have both insert/update in one
statement, though these should now work in theory provided
the underlying database supports such a statement.

Change-Id: I3b6a860e22c86743c91c56a7ec751ff706f66f64
Fixes: #3745
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/crud.py
test/requirements.py
test/sql/test_defaults.py