]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Rework select(), CompoundSelect() in terms of CompileState
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 6 Mar 2020 21:04:46 +0000 (16:04 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Mar 2020 20:55:03 +0000 (16:55 -0400)
commit693938dd6fb2f3ee3e031aed4c62355ac97f3ceb
tree94701d7df1b7274151800efd6ca996e1f4203916
parent851fb8f5a661c66ee76308181118369c8c4df9e0
Rework select(), CompoundSelect() in terms of CompileState

Continuation of I408e0b8be91fddd77cf279da97f55020871f75a9

- add an options() method to the base Generative construct.
this will be where ORM options can go
- Change Null, False_, True_ to be singletons, so that
we aren't instantiating them and having to use isinstance.
The previous issue with this was that they would produce dupe
labels in SELECT statements.   Apply the duplicate column
logic, newly added in 1.4, to these objects as well as to
non-apply-labels SELECT statements in general as a means of
improving this.
- create a revised system for generating ClauseList compilation
constructs that simplfies up front creation to not actually
use ClauseList; a simple tuple is rendered by the compiler
using the same constrcution rules as what are used for
ClauseList but without creating the actual object.  Apply
to Select, CompoundSelect, revise Update, Delete
- Select, CompoundSelect get an initial CompileState
implementation.  All methods used only within compilation
are moved here
- refine update/insert/delete compile state to not require
an outside boolean
- refine and simplify Select._copy_internals
- rework bind(), which is going away, to not use some
of the internal traversal stuff
- remove "autocommit", "for_update" parameters from Select,
  references #4643
- remove "autocommit" parameter from TextClause ,
  references #4643
- add deprecation warnings for statement.execute(),
engine.execute(), statement.scalar(), engine.scalar().
Fixes: #5193
Change-Id: I04ca0152b046fd42c5054ba10f37e43fc6e5a57b
20 files changed:
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/traversals.py
lib/sqlalchemy/testing/assertions.py
test/aaa_profiling/test_memusage.py
test/aaa_profiling/test_misc.py
test/engine/test_deprecations.py
test/orm/test_eager_relations.py
test/profiles.txt
test/sql/test_compiler.py
test/sql/test_deprecations.py
test/sql/test_external_traversal.py
test/sql/test_operators.py
test/sql/test_selectable.py
test/sql/test_utils.py