]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implement new ClauseElement role and coercion system
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 30 Apr 2019 03:26:36 +0000 (23:26 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 18 May 2019 21:46:10 +0000 (17:46 -0400)
commitf07e050c9ce4afdeb9c0c136dbcc547f7e5ac7b8
tree1b3cd7409ae2eddef635960126551d74f469acc1
parent614dfb5f5b5a2427d5d6ce0bc5f34bf0581bf698
Implement new ClauseElement role and coercion system

A major refactoring of all the functions handle all detection of
Core argument types as well as perform coercions into a new class hierarchy
based on "roles", each of which identify a syntactical location within a
SQL statement.  In contrast to the ClauseElement hierarchy that identifies
"what" each object is syntactically, the SQLRole hierarchy identifies
the "where does it go" of each object syntactically.   From this we define
a consistent type checking and coercion system that establishes well
defined behviors.

This is a breakout of the patch that is reorganizing select()
constructs to no longer be in the FromClause hierarchy.

Also includes a rename of as_scalar() into scalar_subquery(); deprecates
automatic coercion to scalar_subquery().

Partially-fixes: #4617
Change-Id: I26f1e78898693c6b99ef7ea2f4e7dfd0e8e1a1bd
85 files changed:
doc/build/changelog/unreleased_14/4617_coercion.rst [new file with mode: 0644]
doc/build/changelog/unreleased_14/4617_scalar.rst [new file with mode: 0644]
doc/build/core/tutorial.rst
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/ext.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/ext/baked.py
lib/sqlalchemy/ext/declarative/clsregistry.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/collections.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/relationships.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/sql/__init__.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/coercions.py [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/crud.py
lib/sqlalchemy/sql/ddl.py
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/operators.py
lib/sqlalchemy/sql/roles.py [new file with mode: 0644]
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/type_api.py
lib/sqlalchemy/testing/__init__.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/testing/suite/test_cte.py
lib/sqlalchemy/testing/suite/test_results.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/langhelpers.py
test/dialect/mssql/test_compiler.py
test/dialect/mssql/test_query.py
test/dialect/mysql/test_query.py
test/ext/declarative/test_basic.py
test/ext/declarative/test_mixin.py
test/ext/test_baked.py
test/orm/inheritance/test_assorted_poly.py
test/orm/inheritance/test_basic.py
test/orm/inheritance/test_polymorphic_rel.py
test/orm/inheritance/test_single.py
test/orm/test_collection.py
test/orm/test_deprecations.py
test/orm/test_eager_relations.py
test/orm/test_froms.py
test/orm/test_lazy_relations.py
test/orm/test_mapper.py
test/orm/test_query.py
test/orm/test_rel_fn.py
test/orm/test_relationships.py
test/orm/test_update_delete.py
test/profiles.txt
test/sql/test_case_statement.py
test/sql/test_compare.py
test/sql/test_compiler.py
test/sql/test_cte.py
test/sql/test_defaults.py
test/sql/test_delete.py
test/sql/test_deprecations.py
test/sql/test_generative.py
test/sql/test_inspect.py
test/sql/test_join_rewriting.py
test/sql/test_metadata.py
test/sql/test_operators.py
test/sql/test_resultset.py
test/sql/test_returning.py
test/sql/test_roles.py [new file with mode: 0644]
test/sql/test_selectable.py
test/sql/test_text.py
test/sql/test_types.py
test/sql/test_update.py