]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Added new generic function "next_value()", accepts
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 20 Mar 2011 16:49:28 +0000 (12:49 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 20 Mar 2011 16:49:28 +0000 (12:49 -0400)
commit90335a89a98df23db7a3ae1233eb4fbb5743d2e8
tree9a4ac236f83696709bd355dcac22552aeb177694
parent75c78aa714ca55818f0ba12a67cf2f77927b68f7
- Added new generic function "next_value()", accepts
a Sequence object as its argument and renders the
appropriate "next value" generation string on the
target platform, if supported.  Also provides
".next_value()" method on Sequence itself.
[ticket:2085]
- added tests for all the conditions described
in [ticket:2085]
- postgresql dialect will exec/compile a Sequence
that has "optional=True".  the optional flag is now only
checked specifically in the context of a Table primary key
evaulation.
- func.next_value() or other SQL expression can
be embedded directly into an insert() construct,
and if implicit or explicit "returning" is used
in conjunction with a primary key column,
the newly generated value will be present in
result.inserted_primary_key. [ticket:2084]
CHANGES
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/schema.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/sql/functions.py
test/sql/test_defaults.py