]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The :func:`.cast` function, when given a plain literal value,
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Dec 2013 20:38:35 +0000 (15:38 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Dec 2013 20:38:35 +0000 (15:38 -0500)
commit80b6591dbea86f87cc845c67ea11c1449ee75eee
tree4f49591d79138718c02b733f24d565a75de339b7
parentd98fcca0b3441e09c3d56ad69c93b41f9b240f0f
- The :func:`.cast` function, when given a plain literal value,
will now apply the given type to the given literal value on the
bind parameter side according
to the type given to the cast.   This essentially replaces what would
normally be the detected type of the literal value.   This only
takes effect if the auto-detected type of the literal value is either
"nulltype" (e.g. couldn't detect)
or a type that is of the same "affinity" as the cast type.
The net change here is that the :func:`.cast` function includes more
of the functionality already present in the :func:`.type_coerce` function.
doc/build/changelog/changelog_09.rst
lib/sqlalchemy/sql/elements.py
test/sql/test_types.py