]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- A deep improvement to the recently added :meth:`.TextClause.columns`
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 14 Jan 2016 23:06:26 +0000 (18:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 14 Jan 2016 23:06:26 +0000 (18:06 -0500)
commit1f7a1f777d8fe1bdea1e793c8ec8ebb7c625e347
treec46674ad4a3fde2aaf9eb8238650879161f6eea7
parent0ff3f95d5b41335c977e1bdbe88b7dfd4ae581e1
- A deep improvement to the recently added :meth:`.TextClause.columns`
method, and its interaction with result-row processing, now allows
the columns passed to the method to be positionally matched with the
result columns in the statement, rather than matching on name alone.
The advantage to this includes that when linking a textual SQL statement
to an ORM or Core table model, no system of labeling or de-duping of
common column names needs to occur, which also means there's no need
to worry about how label names match to ORM columns and so-forth.  In
addition, the :class:`.ResultProxy` has been further enhanced to
map column and string keys to a row with greater precision in some
cases.  fixes #3501
- reorganize the initialization of ResultMetaData for readability
and complexity; use the name "cursor_description", define the
task of "merging" cursor_description with compiled column information
as its own function, and also define "name extraction" as a separate task.
- fully change the name we use in the "ambiguous column" error to be the
actual name that was ambiguous, modify the C ext also
15 files changed:
doc/build/changelog/changelog_11.rst
doc/build/changelog/migration_11.rst
doc/build/core/selectable.rst
doc/build/core/tutorial.rst
doc/build/orm/tutorial.rst
lib/sqlalchemy/cextension/resultproxy.c
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/selectable.py
test/base/test_tutorials.py
test/profiles.txt
test/sql/test_resultset.py
test/sql/test_type_expressions.py