]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
See if the future is here
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Aug 2020 21:56:43 +0000 (17:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Aug 2020 22:14:11 +0000 (18:14 -0400)
commit1e800285508ecd869c6874fed6f46ff68815d184
tree681e28afe2a8fb8fa98226783b5dba43cbea75f5
parent1a745336d7e129233ead41bd18d83b543258bba6
See if the future is here

The docs are going to talk a lot about session.execute(select())
for ORM queries, and additionally it's much easier to help
users with queries and such if we can use this new syntax.
I'm hoping to see how hard it is to get a unified tutorial
started that switches to new syntax.  Basically, new syntax
is much easier to explain and less buggy.   But, if we
are starting to present new syntax with the explicit goal
of being easier to explain for less experienced programmers,
the "future" thing is going to just be an impediment
to that.

See if we can remove "future" from session.execute(),
so that ORM-enabled select() statements return ORM results
at that level.  This does not change the presence of the
"future" flag for the Session's construction and for its
transactional behaviors.

The only perceptible change of the future flag for
session.execute() is that session.execute(select()) where the
statement has ORM entities in it now returns ORM new
style tuples rather than old style tuples.   Like
mutating a URL, it's hopefully not very common that people
are doing this.

Change-Id: I0aa10322bb787d554d32772e3bc60548f1bf6206
lib/sqlalchemy/ext/baked.py
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/strategies.py
test/ext/test_baked.py
test/orm/test_query.py