]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Reimplement .compare() in terms of a visitor
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 17 Apr 2019 17:37:39 +0000 (13:37 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 29 Apr 2019 15:54:25 +0000 (11:54 -0400)
commit099522075088a3e1a333a2285c10a8a33b203c19
treeb1359c9ff50d19e4787d8ead0bfe5b03ad1fb69a
parent2f55c844051d9fe8865576bd77107e94c6de16c1
Reimplement .compare() in terms of a visitor

Reworked the :meth:`.ClauseElement.compare` methods in terms of a new
visitor-based approach, and additionally added test coverage ensuring that
all :class:`.ClauseElement` subclasses can be accurately compared
against each other in terms of structure.   Structural comparison
capability is used to a small degree within the ORM currently, however
it also may form the basis for new caching features.

Fixes: #4336
Change-Id: I581b667d8e1642a6c27165cc9f4aded1c66effc6
doc/build/changelog/unreleased_13/4336.rst [new file with mode: 0644]
lib/sqlalchemy/sql/clause_compare.py [new file with mode: 0644]
lib/sqlalchemy/sql/crud.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/operators.py
lib/sqlalchemy/sql/selectable.py
test/ext/test_compiler.py
test/sql/test_compare.py [new file with mode: 0644]
test/sql/test_operators.py
test/sql/test_utils.py