]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The :func:`~.expression.column` and :func:`~.expression.table`
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 2 Sep 2014 00:19:54 +0000 (20:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 2 Sep 2014 00:19:54 +0000 (20:19 -0400)
commit7c6a45c480a865ac9580eb33fcca2dae5b19dd11
tree870c078707cde0af769a940b1fc1a15ce7966691
parent382f82538b5484b1c384c71fbf84438312cbe34f
- The :func:`~.expression.column` and :func:`~.expression.table`
constructs are now importable from the "from sqlalchemy" namespace,
just like every other Core construct.
- The implicit conversion of strings to :func:`.text` constructs
when passed to most builder methods of :func:`.select` as
well as :class:`.Query` now emits a warning with just the
plain string sent.   The textual conversion still proceeds normally,
however.  The only method that accepts a string without a warning
are the "label reference" methods like order_by(), group_by();
these functions will now at compile time attempt to resolve a single
string argument to a column or label expression present in the
selectable; if none is located, the expression still renders, but
you get the warning again. The rationale here is that the implicit
conversion from string to text is more unexpected than not these days,
and it is better that the user send more direction to the Core / ORM
when passing a raw string as to what direction should be taken.
Core/ORM tutorials have been updated to go more in depth as to how text
is handled.
fixes #2992
33 files changed:
doc/build/changelog/changelog_10.rst
doc/build/changelog/migration_10.rst
doc/build/conf.py
doc/build/core/tutorial.rst
doc/build/orm/tutorial.rst
lib/sqlalchemy/__init__.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/__init__.py
lib/sqlalchemy/util/langhelpers.py
test/aaa_profiling/test_memusage.py
test/dialect/mysql/test_compiler.py
test/dialect/postgresql/test_types.py
test/dialect/test_oracle.py
test/orm/test_assorted_eager.py
test/orm/test_deprecations.py
test/orm/test_eager_relations.py
test/orm/test_froms.py
test/orm/test_query.py
test/orm/test_selectable.py
test/orm/test_update_delete.py
test/sql/test_compiler.py
test/sql/test_functions.py
test/sql/test_generative.py
test/sql/test_insert.py
test/sql/test_query.py
test/sql/test_text.py