]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
4 years agoMerge "Improve reflection for mssql temporary tables" 5550/head
mike bayer [Tue, 1 Sep 2020 17:12:11 +0000 (17:12 +0000)] 
Merge "Improve reflection for mssql temporary tables"

4 years agoMerge "Add support for classical mapping of dataclasses"
mike bayer [Tue, 1 Sep 2020 17:10:53 +0000 (17:10 +0000)] 
Merge "Add support for classical mapping of dataclasses"

4 years agoMerge "MariaDB dialect implementation"
mike bayer [Tue, 1 Sep 2020 17:09:19 +0000 (17:09 +0000)] 
Merge "MariaDB dialect implementation"

4 years agoAdd support for classical mapping of dataclasses
Václav Klusák [Mon, 17 Aug 2020 15:58:56 +0000 (11:58 -0400)] 
Add support for classical mapping of dataclasses

Added support for direct mapping of Python classes that are defined using
the Python ``dataclasses`` decorator.    See the section
:ref:`mapping_dataclasses` for background.  Pull request courtesy Václav
Klusák.

Fixes: #5027
Closes: #5516
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5516
Pull-request-sha: bb48c63d1561ca48c954ad9f84a3eb2646571115

Change-Id: Ie33db2aae4adeeb5d99633fe926b9c30bab0b885

4 years agoImprove reflection for mssql temporary tables
Gord Thompson [Wed, 12 Aug 2020 20:46:59 +0000 (14:46 -0600)] 
Improve reflection for mssql temporary tables

Fixes: #5506
Change-Id: I718474d76e3c630a1b71e07eaa20cefb104d11de

4 years agoMerge "Provide a more detailed error message for Query.join()"
mike bayer [Tue, 1 Sep 2020 13:50:29 +0000 (13:50 +0000)] 
Merge "Provide a more detailed error message for Query.join()"

4 years agoProvide a more detailed error message for Query.join()
RamonWill [Tue, 25 Aug 2020 00:14:15 +0000 (20:14 -0400)] 
Provide a more detailed error message for Query.join()

An :class:`.ArgumentError` with more detail is now raised if the target
parameter for :meth:`_query.Query.join` is set to an unmapped object.
Prior to this change a less detailed ``AttributeError`` was raised.
Pull request courtesy Ramon Williams.

Fixes: #4428
Closes: #5452
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5452
Pull-request-sha: b148df547037e9a254fe331eff8e922c78426261

Change-Id: I873453d1fdb651178216aac698baac63ae5a94e8

4 years agoFix a mis-reference in create_async_engine().
Fantix King [Sat, 29 Aug 2020 16:37:34 +0000 (12:37 -0400)] 
Fix a mis-reference in create_async_engine().

`AsyncMethodRequired` is actually from
`sqlalchemy.ext.asyncio.exc`, so here it
should be referenced as `async_exc.AsyncMethodRequired`,
instead of `exc.AsyncMethodRequired`.

Fixes: #5529
Closes: #5545
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5545
Pull-request-sha: d8f885c587dd058f909d4f3bdbec3d0fca176680

Change-Id: I6886558bfd33d3e9e283fbd60c0ec971a1f22c0c

4 years agoMariaDB dialect implementation
Georg Richter [Thu, 20 Aug 2020 12:00:14 +0000 (08:00 -0400)] 
MariaDB dialect implementation

Fixes: #5459
Closes: #5515
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5515
Pull-request-sha: 760090b9067304cc65fece12fcf10b522afc4a2a

Change-Id: I30e8fbc02b7b5329ca228cd39f6fb7cfd0e43092

4 years agoSome updates for creational patterns
Mike Bayer [Mon, 31 Aug 2020 17:31:00 +0000 (13:31 -0400)] 
Some updates for creational patterns

I'm finding it useful to use "with Session(engine) as session,
session.begin()" so add an example for that.

Change-Id: I4403ced51a5e90cfe6b0173813db4cb631957f4c

4 years agoMerge "Include PostgreSQL in trigger test and correct documentation example"
mike bayer [Mon, 31 Aug 2020 16:34:31 +0000 (16:34 +0000)] 
Merge "Include PostgreSQL in trigger test and correct documentation example"

4 years agoInclude PostgreSQL in trigger test and correct documentation example
RamonWill [Sun, 30 Aug 2020 13:05:06 +0000 (09:05 -0400)] 
Include PostgreSQL in trigger test and correct documentation example

Include PostgreSQL dialect in trigger test and correct DDL example in documentation

A user highlighted that the syntax in the DDL trigger example was incorrect for PostgreSQL. The trigger tests where also skipping the PostgreSQL dialect until the syntax was corrected. This PR fixes both of these issues.

This pull request is:

- [X ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**
Fixes: #4037
Closes: #5548
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5548
Pull-request-sha: 1db5e47adb90f9d51e247711dcfdbb274fb7bf73

Change-Id: I06edbcab99c82a3ce25581b81f8d2a4a028c07c3

4 years agoFix AsyncEngine connect() bug when pool is exhausted
Fantix King [Mon, 31 Aug 2020 07:41:00 +0000 (03:41 -0400)] 
Fix AsyncEngine connect() bug when pool is exhausted

### Description

Decorating the referenced `await_fallback` with `staticmethod` would stop `AsyncAdaptedQueue.await_` from being treated as a bound method.

### Checklist

This pull request is:

- [x] A short code fix
    Fixes #5546

**Have a nice day!**

Closes: #5547
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5547
Pull-request-sha: 6f18ee290e7d9fe24ce2a4a4ed8069b46082ca18

Change-Id: Ie335ee650f1dee0d1fce59e448217a48307b3435

4 years agoSupport extra / single inh criteria with ORM update/delete
Mike Bayer [Sun, 30 Aug 2020 22:13:36 +0000 (18:13 -0400)] 
Support extra / single inh criteria with ORM update/delete

The ORM bulk update and delete operations, historically available via the
:meth:`_orm.Query.update` and :meth:`_orm.Query.delete` methods as well as
via the :class:`_dml.Update` and :class:`_dml.Delete` constructs for
:term:`2.0 style` execution, will now automatically accommodate for the
additional WHERE criteria needed for a single-table inheritance
discrminiator.   Joined-table inheritance is still not directly
supported. The new :func:`_orm.with_loader_criteria` construct is also
supported for all mappings with bulk update/delete.

Fixes: #5018
Fixes: #3903
Change-Id: Id90827cc7e2bc713d1255127f908c8e133de9295

4 years agoMerge "internal test framework files for standardization of is_not/not_in;"
mike bayer [Sun, 30 Aug 2020 14:33:08 +0000 (14:33 +0000)] 
Merge "internal test framework files for standardization of is_not/not_in;"

4 years agoUpdate connection docs for migrating off of nesting
Mike Bayer [Sat, 29 Aug 2020 18:32:20 +0000 (14:32 -0400)] 
Update connection docs for migrating off of nesting

Change-Id: I3a81140f00a4a9945121bfb8ec4c0e3953b4085f

4 years agointernal test framework files for standardization of is_not/not_in;
jonathan vanasco [Mon, 24 Aug 2020 22:53:31 +0000 (18:53 -0400)] 
internal test framework files for standardization of is_not/not_in;

this is safe for 1.3.x

Change-Id: Icba38fdc20f5d8ac407383a4278ccb346e09af38

4 years agoSee if the future is here
Mike Bayer [Fri, 28 Aug 2020 21:56:43 +0000 (17:56 -0400)] 
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

4 years agoMerge "Emit v2.0 deprecation warning for "implicit autocommit""
mike bayer [Fri, 28 Aug 2020 21:45:51 +0000 (21:45 +0000)] 
Merge "Emit v2.0 deprecation warning for "implicit autocommit""

4 years agoEmit v2.0 deprecation warning for "implicit autocommit"
Gord Thompson [Fri, 21 Aug 2020 16:29:29 +0000 (10:29 -0600)] 
Emit v2.0 deprecation warning for "implicit autocommit"

"Implicit autocommit", which is the COMMIT that occurs when a DML or DDL
statement is emitted on a connection, is deprecated and won't be part of
SQLAlchemy 2.0.   A 2.0-style warning is emitted when autocommit takes
effect, so that the calling code may be adjusted to use an explicit
transaction.

As part of this change, DDL methods such as
:meth:`_schema.MetaData.create_all` when used against a
:class:`_engine.Engine` or :class:`_engine.Connection` will run the
operation in a BEGIN block if one is not started already.

The MySQL and MariaDB dialects now query from the information_schema.tables
system view in order to determine if a particular table exists or not.
Previously, the "DESCRIBE" command was used with an exception catch to
detect non-existent,  which would have the undesirable effect of emitting a
ROLLBACK on the connection. There appeared to be legacy encoding issues
which prevented the use of "SHOW TABLES", for this, but as MySQL support is
now at 5.0.2  or above due to :ticket:`4189`, the information_schema tables
are now available in all cases.

Fixes: #4846
Change-Id: I733a7e0e17477a63607fb9931c87c393bbd7ac57

4 years agoMerge "ARM64 Support to Github Actions For Testing And Development Of Wheels"
Federico Caselli [Fri, 28 Aug 2020 20:25:12 +0000 (20:25 +0000)] 
Merge "ARM64 Support to Github Actions For Testing And Development Of Wheels"

4 years agoMerge "Update authors file"
mike bayer [Fri, 28 Aug 2020 14:06:43 +0000 (14:06 +0000)] 
Merge "Update authors file"

4 years agoUpdate authors file
Federico Caselli [Thu, 20 Aug 2020 20:42:28 +0000 (22:42 +0200)] 
Update authors file

Add all authors with more than 10 commits. The email are
omitted to avoid possible spam (even if they
are not private since they are in the git history, they
are at least not grep friendly)

Output obtained by `git shortlog --summary | sort -r`

Change-Id: Ib364763b755c84e7980dfe9687cada7d2bbd1f63

4 years agoMerge "Add support for regular expression on supported backend."
mike bayer [Thu, 27 Aug 2020 22:28:39 +0000 (22:28 +0000)] 
Merge "Add support for regular expression on supported backend."

4 years agoAdd support for regular expression on supported backend.
Federico Caselli [Thu, 16 Jul 2020 19:32:52 +0000 (21:32 +0200)] 
Add support for regular expression on supported backend.

Two operations have been defined:

* :meth:`~.ColumnOperators.regexp_match` implementing a regular
  expression match like function.
* :meth:`~.ColumnOperators.regexp_replace` implementing a regular
  expression string replace function.

Fixes: #1390
Change-Id: I44556846e4668ccf329023613bd26861d5c674e6

4 years agoRaise NotImplemenedError for association proxy __clause_element__
Mike Bayer [Thu, 27 Aug 2020 19:50:47 +0000 (15:50 -0400)] 
Raise NotImplemenedError for association proxy __clause_element__

It's not possible right now to use an association proxy element as a plain
column expression to be SELECTed from or used in a SQL function.  An
informative error is now raised when this occurs.

Fixes: #5542
Change-Id: I334e767ebc0b56c1dccc4a1e5185b0435af77b93

4 years agoDocument caveat about backrefs and attribute_mapped_collection
Mike Bayer [Wed, 26 Aug 2020 15:44:34 +0000 (11:44 -0400)] 
Document caveat about backrefs and attribute_mapped_collection

Fixes: #5538
Change-Id: I2bda6bed40d35560a71bf0ed09d141047ce59e82

4 years agoMerge "make URL immutable"
mike bayer [Wed, 26 Aug 2020 02:44:17 +0000 (02:44 +0000)] 
Merge "make URL immutable"

4 years agoMerge "More descriptive error for non-mapped string prop name"
mike bayer [Wed, 26 Aug 2020 02:43:32 +0000 (02:43 +0000)] 
Merge "More descriptive error for non-mapped string prop name"

4 years agomake URL immutable
Mike Bayer [Fri, 21 Aug 2020 18:44:04 +0000 (14:44 -0400)] 
make URL immutable

it's not really correct that URL is mutable and doesn't do
any argument checking.   propose replacing it with an immutable
named tuple with rich copy-and-mutate methods.

At the moment this makes a hard change to the CreateEnginePlugin
docs that previously recommended url.query.pop().  I can't find
any plugins on github other than my own that are using this
feature, so see if we can just make a hard change on this one.

Fixes: #5526
Change-Id: I28a0a471d80792fa8c28f4fa573d6352966a4a79

4 years agoMerge "Updates for MariaDB sequences"
mike bayer [Tue, 25 Aug 2020 22:14:19 +0000 (22:14 +0000)] 
Merge "Updates for MariaDB sequences"

4 years agoMore descriptive error for non-mapped string prop name
jonathan vanasco [Mon, 20 Apr 2020 17:56:49 +0000 (13:56 -0400)] 
More descriptive error for non-mapped string prop name

Fixed issue where using a loader option against a string attribute name
that is not actually a mapped attribute, such as a plain Python descriptor,
would raise an uninformative AttributeError;  a descriptive error is now
raised.

Fixes: #4589
Closes: #4594
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4594
Pull-request-sha: 2b7ed5240f49be90f9390e3d041c9cb957083465

Change-Id: I66b9937991eb7cdbe074a92f490af1c80d16449e

4 years agoMerge "Improve docs of Identity columns."
mike bayer [Mon, 24 Aug 2020 22:46:12 +0000 (22:46 +0000)] 
Merge "Improve docs of Identity columns."

4 years agoARM64 Support to Github Actions For Testing And Development Of Wheels
odidev [Sun, 23 Aug 2020 18:54:56 +0000 (14:54 -0400)] 
ARM64 Support to Github Actions For Testing And Development Of Wheels

**Added**:
1. ARM64 jobs in Github Workflows For Testing And Development Of Wheels
2. Two script files for creating wheels and testing.

Resolves #5436

Signed-off-by: odidev <odidev@puresoftware.com>
Co-authored-by: Federico Caselli <cfederico87@gmail.com>
Closes: #5480
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5480
Pull-request-sha: 131ef520bbf863ad9b65ca3bf3c2d2d214405702

Change-Id: Ia10dadd93365ba4beeefbd27c060bc077c2d7aeb

4 years agoFix typo in docs examples of psycopg2.connect
Federico Caselli [Mon, 24 Aug 2020 21:05:10 +0000 (23:05 +0200)] 
Fix typo in docs examples of psycopg2.connect

Fixes: #5535
Change-Id: I7341137ec63c5a7978f9fe15ad1a932e068321c2

4 years agoImprove docs of Identity columns.
Federico Caselli [Mon, 24 Aug 2020 19:13:49 +0000 (21:13 +0200)] 
Improve docs of Identity columns.

Change-Id: Iba85ac3c2c9f40878768d74a5dd33083fc68e504

4 years agoAdd deprecation warning for mssql legacy_schema_aliasing
Gord Thompson [Thu, 20 Aug 2020 22:26:13 +0000 (16:26 -0600)] 
Add deprecation warning for mssql legacy_schema_aliasing

Fixes: #4809
Change-Id: I9ce2a5dfb79d86624c187ee28b5911fd14328ce2

4 years agoUpdates for MariaDB sequences
Federico Caselli [Fri, 21 Aug 2020 22:30:44 +0000 (00:30 +0200)] 
Updates for MariaDB sequences

MariaDB should not run a Sequence if it has optional=True.
Additionally, rework the rules in crud.py to accommodate the
new combination MariaDB brings us, which is a dialect
that supports both cursor.lastrowid, explicit sequences,
*and* no support for returning.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #5528
Change-Id: I9a8ea69a34983affa95dfd22186e2908fdf0d58c

4 years agoMerge "Add support for identity columns"
mike bayer [Fri, 21 Aug 2020 21:39:40 +0000 (21:39 +0000)] 
Merge "Add support for identity columns"

4 years agoMerge "Raise UnmappedInstanceError if the attribute of a database object is an unmapp...
mike bayer [Thu, 20 Aug 2020 19:24:12 +0000 (19:24 +0000)] 
Merge "Raise UnmappedInstanceError if the attribute of a database object is an unmapped object."

4 years agoMerge "normalize execute style for events, 2.0"
mike bayer [Thu, 20 Aug 2020 15:22:08 +0000 (15:22 +0000)] 
Merge "normalize execute style for events, 2.0"

4 years agonormalize execute style for events, 2.0
Mike Bayer [Wed, 19 Aug 2020 16:08:26 +0000 (12:08 -0400)] 
normalize execute style for events, 2.0

The _execute_20 and exec_driver_sql methods should wrap
up the parameters so that they represent the single list / single
dictionary style of invocation into the legacy methods.  then
the before_ after_ execute event handlers should be receiving
the parameter dictionary as a single dictionary.   this requires
that we break out distill_params to work differently if event
handlers are present.

additionally, add deprecation warnings for old argument passing
styles.

Change-Id: I97cb4d06adfcc6b889f10d01cc7775925cffb116

4 years agoMerge "Implement DDL visitor for PG ENUM with schema translate support"
mike bayer [Wed, 19 Aug 2020 17:38:07 +0000 (17:38 +0000)] 
Merge "Implement DDL visitor for PG ENUM with schema translate support"

4 years agoMerge "Add JSON support for mssql"
mike bayer [Wed, 19 Aug 2020 17:25:06 +0000 (17:25 +0000)] 
Merge "Add JSON support for mssql"

4 years agoAdd JSON support for mssql
Gord Thompson [Sat, 1 Aug 2020 21:56:12 +0000 (15:56 -0600)] 
Add JSON support for mssql

Added support for the :class:`_types.JSON` datatype on the SQL Server
dialect using the :class:`_mssql.JSON` implementation, which implements SQL
Server's JSON functionality against the ``NVARCHAR(max)`` datatype as per
SQL Server documentation. Implementation courtesy Gord Thompson.

Fixes: #4384
Change-Id: I28af79a4d8fafaa68ea032228609bba727784f18

4 years agoImplement DDL visitor for PG ENUM with schema translate support
Mike Bayer [Wed, 19 Aug 2020 02:53:09 +0000 (22:53 -0400)] 
Implement DDL visitor for PG ENUM with schema translate support

Fixed issue where the :class:`_postgresql.ENUM` type would not consult the
schema translate map when emitting a CREATE TYPE or DROP TYPE during the
test to see if the type exists or not.  Additionally, repaired an issue
where if the same enum were encountered multiple times in a single DDL
sequence, the "check" query would run repeatedly rather than relying upon a
cached value.

Fixes: #5520
Change-Id: I79f46e29ac0168e873ff178c242f8d78f6679aeb

4 years agoAdd support for identity columns
Federico Caselli [Sat, 30 May 2020 12:45:00 +0000 (14:45 +0200)] 
Add support for identity columns

Added the :class:`_schema.Identity` construct that can be used to
configure identity columns rendered with GENERATED { ALWAYS |
BY DEFAULT } AS IDENTITY. Currently the supported backends are
PostgreSQL >= 10, Oracle >= 12 and MSSQL (with different syntax
and a subset of functionalities).

Fixes: #5362
Fixes: #5324
Fixes: #5360
Change-Id: Iecea6f3ceb36821e8b96f0b61049b580507a1875

4 years agoSupport data types for CREATE SEQUENCE in PostgreSQL
Federico Caselli [Fri, 7 Aug 2020 20:38:24 +0000 (22:38 +0200)] 
Support data types for CREATE SEQUENCE in PostgreSQL

Allow specifying the data type when creating a :class:`.Sequence` in
PostgreSQL by using the parameter :paramref:`.Sequence.data_type`.

Fixes: #5498
Change-Id: I2b4a80aa89b1503c56748dc3ecd2cf145faddd8b

4 years agoMerge "Deliver straight BinaryExpr w/ no negate for any() / all()"
mike bayer [Tue, 18 Aug 2020 19:07:19 +0000 (19:07 +0000)] 
Merge "Deliver straight BinaryExpr w/ no negate for any() / all()"

4 years agoDeliver straight BinaryExpr w/ no negate for any() / all()
Mike Bayer [Tue, 18 Aug 2020 18:17:06 +0000 (14:17 -0400)] 
Deliver straight BinaryExpr w/ no negate for any() / all()

Adjusted the :meth:`_types.ARRAY.Comparator.any` and
:meth:`_types.ARRAY.Comparator.all` methods to implement a straight "NOT"
operation for negation, rather than negating the comparison operator.

Fixes: #5518
Change-Id: I87ee9278c321aafe51a679fcfcbb5fbb11307fda

4 years agoMerge "Update dialect for pg8000 version 1.16.0"
mike bayer [Tue, 18 Aug 2020 17:33:46 +0000 (17:33 +0000)] 
Merge "Update dialect for pg8000 version 1.16.0"

4 years agoUpdate dialect for pg8000 version 1.16.0
Tony Locke [Sun, 2 Aug 2020 19:19:26 +0000 (15:19 -0400)] 
Update dialect for pg8000 version 1.16.0

The pg8000 dialect has been revised and modernized for the most recent
version of the pg8000 driver for PostgreSQL.  Changes to the dialect
include:

* All data types are now sent as text rather than binary.

* Using adapters, custom types can be plugged in to pg8000.

* Previously, named prepared statements were used for all statements.
  Now unnamed prepared statements are used by default, and named
  prepared statements can be used explicitly by calling the
  Connection.prepare() method, which returns a PreparedStatement
  object.

Pull request courtesy Tony Locke.

Notes by Mike: to get this all working it was needed to break
up JSONIndexType into "str" and "int" subtypes; this will be
needed for any dialect that is dependent on setinputsizes().

also includes @caselit's idea to include query params
in the dbdriver parameter.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #5451
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5451
Pull-request-sha: 639751ca9c7544801b9ede02e6cbe15a16c59c82

Change-Id: I2869bc52c330916773a41d11d12c297aecc8fcd8

4 years agoClarify that session.close() is like reset
Mike Bayer [Tue, 18 Aug 2020 14:52:04 +0000 (10:52 -0400)] 
Clarify that session.close() is like reset

Fixes: #5517
Change-Id: I86809cf84de3ec19a279ae13f4e5e71336d8b359

4 years agoMerge "Fix wheel check in linux workflow and improve it"
mike bayer [Mon, 17 Aug 2020 22:08:22 +0000 (22:08 +0000)] 
Merge "Fix wheel check in linux workflow and improve it"

4 years agoFix wheel check in linux workflow and improve it
Federico Caselli [Mon, 17 Aug 2020 21:29:50 +0000 (23:29 +0200)] 
Fix wheel check in linux workflow and improve it

Change-Id: I3b208674649e41bca0285d00aa11cc5975eb971a

4 years agocherry-pick changelog update for 1.3.20
Mike Bayer [Mon, 17 Aug 2020 20:12:12 +0000 (16:12 -0400)] 
cherry-pick changelog update for 1.3.20

4 years agocherry-pick changelog from 1.3.19
Mike Bayer [Mon, 17 Aug 2020 20:12:11 +0000 (16:12 -0400)] 
cherry-pick changelog from 1.3.19

4 years agoMerge "Create a real type for Tuple() and handle appropriately in compiler"
mike bayer [Mon, 17 Aug 2020 19:56:30 +0000 (19:56 +0000)] 
Merge "Create a real type for Tuple() and handle appropriately in compiler"

4 years agoMerge "Make discriminator column used by ConcreteBase configurable"
mike bayer [Mon, 17 Aug 2020 19:55:38 +0000 (19:55 +0000)] 
Merge "Make discriminator column used by ConcreteBase configurable"

4 years agoMerge "Bump minimum MySQL version to 5.0.2; use all-numeric server version"
mike bayer [Mon, 17 Aug 2020 15:53:20 +0000 (15:53 +0000)] 
Merge "Bump minimum MySQL version to 5.0.2; use all-numeric server version"

4 years agoMake discriminator column used by ConcreteBase configurable
Jesse Bakker [Mon, 17 Aug 2020 14:35:35 +0000 (10:35 -0400)] 
Make discriminator column used by ConcreteBase configurable

The name of the virtual column used when using the
:class:`_declarative.AbstractConcreteBase` and
:class:`_declarative.ConcreteBase` classes can now be customized, to allow
for models that have a column that is actually named ``type``.  Pull
request courtesy Jesse-Bakker.

Fixes: #5513
Closes: #5514
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5514
Pull-request-sha: 5e7429f3531e2e22fffe996c9760905578d16ef9

Change-Id: I733737844d4f4e1f52dd2475a66c7044ff7292f5

4 years agoCreate a real type for Tuple() and handle appropriately in compiler
Mike Bayer [Sat, 15 Aug 2020 19:08:09 +0000 (15:08 -0400)] 
Create a real type for Tuple() and handle appropriately in compiler

Improved the :func:`_sql.tuple_` construct such that it behaves predictably
when used in a columns-clause context.  The SQL tuple is not supported as a
"SELECT" columns clause element on most backends; on those that do
(PostgreSQL, not surprisingly), the Python DBAPI does not have a "nested
type" concept so there are still challenges in fetching rows for such an
object. Use of :func:`_sql.tuple_` in a :func:`_sql.select` or
:class:`_orm.Query` will now raise a :class:`_exc.CompileError` at the
point at which the :func:`_sql.tuple_` object is seen as presenting itself
for fetching rows (i.e., if the tuple is in the columns clause of a
subquery, no error is raised).  For ORM use,the :class:`_orm.Bundle` object
is an explicit directive that a series of columns should be returned as a
sub-tuple per row and is suggested by the error message. Additionally ,the
tuple will now render with parenthesis in all contexts. Previously, the
parenthesization would not render in a columns context leading to
non-defined behavior.

As part of this change, Tuple receives a dedicated datatype
which appears to allow us the very desirable change of removing
the bindparam._expanding_in_types attribute as well as
ClauseList._tuple_values (which might already have not been
needed due to #4645).

Fixes: #5127
Change-Id: Iecafa0e0aac2f1f37ec8d0e1631d562611c90200

4 years agoerror message for Lookup
RamonWill [Wed, 12 Aug 2020 18:50:20 +0000 (14:50 -0400)] 
error message for Lookup

Thr proposed change will provide the user with the target Enum Class name as well as up to four possible enum values when a LookupError is raised in the Enum Class.

A user requested that the enum name and possible values are included to the LookupError message to make debugging easier. The criteria included using ellipses for Enums containing more than four values and using ellipses for enum values that were greater than a certain number of characters (for this resolution the limit is 11 characters).

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [X ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**
Fixes: #4733
Closes: #5490
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5490
Pull-request-sha: 55e76f2ae796b59b7de157cfaae5235dffa359cb

Change-Id: I4541f9efed1c05401587a413e9e748d46938bcd1

4 years agoMerge "Test execution_options on Query object before compilation"
mike bayer [Mon, 17 Aug 2020 14:21:15 +0000 (14:21 +0000)] 
Merge "Test execution_options on Query object before compilation"

4 years agoBump minimum MySQL version to 5.0.2; use all-numeric server version
Mike Bayer [Fri, 14 Aug 2020 04:58:56 +0000 (00:58 -0400)] 
Bump minimum MySQL version to 5.0.2; use all-numeric server version

MySQL dialect's server_version_info tuple is now all numeric.  String
tokens like "MariaDB" are no longer present so that numeric comparison
works in all cases.  The .is_mariadb flag on the dialect should be
consulted for whether or not mariadb was detected.   Additionally removed
structures meant to support extremely old MySQL versions 3.x and 4.x;
the minimum MySQL version supported is now version 5.0.2.

In addition, as the "MariaDB" name goes away from server version,
expand upon the change in I330815ebe572b6a9818377da56621397335fa702
to support the name "mariadb" throughout the dialect and test suite
when mariadb-only mode is used.    This changes the "name" field
on the MariaDB dialect to "mariadb", which then implies a change
throughout the testing requirements system as well as all the
dialect-specific DDL argument names such as "mysql_engine" is
now specified as "mariadb_engine", etc.   Make use of the
recent additions to test suite URL provisioning so that we can
force MariaDB databases to have a "mariadb-only" dialect which
allows us to test this name change fully.

Update documentation to refer to MySQL / MariaDB explicitly
as well as indicating the "mariadb_" prefix used for options.

It seems likely that MySQL and MariaDB version numbers are going to
start colliding at some point so having the "mariadb" name
be available as a totally separate dialect name should give us
some options in this regard.

Currently also includes a date related fix to a test for
the postgresql dialect that was implicitly assuming a
non-UTC timezone

Fixes: #4189
Change-Id: I00e76d00f62971e1f067bd61915fa6cc1cf64e5e

4 years agoMerge "Provision on different drivers dynamically"
mike bayer [Fri, 14 Aug 2020 22:20:44 +0000 (22:20 +0000)] 
Merge "Provision on different drivers dynamically"

4 years agoProvision on different drivers dynamically
Mike Bayer [Fri, 14 Aug 2020 16:07:14 +0000 (12:07 -0400)] 
Provision on different drivers dynamically

We want TOX_POSTGRESQL and similar to be the fixed variable
that is configured from CI environment.   These variables should refer
to database servers but individual drivers like asyncpg mysqlconnector
etc. should come from local tox.ini.  add a new system to generate
per-driver URLs from a simple list of hostname-based URLs delivered
from CI environment.

Change-Id: I4267b4a70742765388c7e7c4432c1da9d9adece2

4 years agoupdate for pytest-xdist terminology
Mike Bayer [Fri, 14 Aug 2020 16:22:17 +0000 (12:22 -0400)] 
update for pytest-xdist terminology

With version 2.0.0 they removed the old terminology, which
I had no idea had been changed in any case for several years.

pushing this out for all branches

Change-Id: I51e4f577aeb9ef8205348b50489549f77072a613

4 years agoDon't import asyncpg prior to python 3.6
Mike Bayer [Fri, 14 Aug 2020 05:02:22 +0000 (01:02 -0400)] 
Don't import asyncpg prior to python 3.6

Continuing on 788ba204a43b37d28cc690138b83e6782f8a46da
make sure asyncpg doesn't get imported if version < 3.6.

Change-Id: Ic070a0c9d3656f7da7ce2eb85033968fc88a64b9

4 years agoDont run py3k-only test files on Python 3.5
Mike Bayer [Fri, 14 Aug 2020 03:05:57 +0000 (23:05 -0400)] 
Dont run py3k-only test files on Python 3.5

these are failing on the github runners because 3.5 doesnt
have the async keywords.

Change-Id: I9c58d38f8d7595313b7648b9840b334da8238bd0

4 years agoUse TOX_POSTGRESQL_MASTER for master
Mike Bayer [Fri, 14 Aug 2020 02:44:33 +0000 (22:44 -0400)] 
Use TOX_POSTGRESQL_MASTER for master

since 1.3 doesn't have updated pg8000 support nor
asyncpg support it needs to stay on the previous
TOX_POSTGRESQL variable, so make a new one that will
have the newer drivers in it.

Change-Id: I19739f8da1231db975a046f12af5eefc9636cd4a

4 years agoDoc fix; use normal TOX_POSTGRESQL env now
Mike Bayer [Fri, 14 Aug 2020 02:38:17 +0000 (22:38 -0400)] 
Doc fix; use normal TOX_POSTGRESQL env now

Change-Id: Ie47a9e9377858641f2f8e038133be27dc9aacd64

4 years agoMerge "Implement rudimentary asyncio support w/ asyncpg"
mike bayer [Fri, 14 Aug 2020 00:08:29 +0000 (00:08 +0000)] 
Merge "Implement rudimentary asyncio support w/ asyncpg"

4 years agoImplement rudimentary asyncio support w/ asyncpg
Mike Bayer [Sat, 4 Jul 2020 16:21:36 +0000 (12:21 -0400)] 
Implement rudimentary asyncio support w/ asyncpg

Using the approach introduced at
https://gist.github.com/zzzeek/6287e28054d3baddc07fa21a7227904e

We can now create asyncio endpoints that are then handled
in "implicit IO" form within the majority of the Core internals.
Then coroutines are re-exposed at the point at which we call
into asyncpg methods.

Patch includes:

* asyncpg dialect

* asyncio package

* engine, result, ORM session classes

* new test fixtures, tests

* some work with pep-484 and a short plugin for the
  pyannotate package, which seems to have so-so results

Change-Id: Idbcc0eff72c4cad572914acdd6f40ddb1aef1a7d
Fixes: #3414
4 years agoMerge "Further fixes for ticket 5470"
mike bayer [Thu, 13 Aug 2020 21:43:09 +0000 (21:43 +0000)] 
Merge "Further fixes for ticket 5470"

4 years agoRaise UnmappedInstanceError if the attribute of a database object is an unmapped...
RamonWill [Thu, 13 Aug 2020 21:23:16 +0000 (17:23 -0400)] 
Raise UnmappedInstanceError if the attribute of a database object is an unmapped object.

The proposed change will raise an UnmappedInstanceError instead of an attribute error if an instance an Instrumented Attribute is unmapped.

### Description
If a user tries to access an attribute of a database object that is unmapped then an error is raised. The reason for this is because the __get__  descriptor  uses instance_state(instance) which uses the operator.attrgetter method to see if the object in question has the attribute "_sa_instance_state" that mapped objects have.  If it doesn't contain this attribute it means that the object is unmapped.

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [X ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**
Fixes: #3858
Closes: #5478
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5478
Pull-request-sha: 853051c9225446b69f52b13ade78709ad2617f6d

Change-Id: I5989c81227e55e628babdd11406d1e8ec0e8d93a

4 years agoTest execution_options on Query object before compilation
RamonWill [Thu, 13 Aug 2020 21:04:13 +0000 (17:04 -0400)] 
Test execution_options on Query object before compilation

 A test that checks if the execution options are being set on the Query object before compilation

### Description
Since Issue #4670 has been open there have changes to the execution mechanics that resolved it. I have just created a test case that will enable the issue to be closed.

This pull request is:

- [ X] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**
Fixes: #4670
Closes: #5446
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5446
Pull-request-sha: c98639ec94279760caacf9f288b180198511dfd3

Change-Id: I686dc7a4735000748c94bff5ba6dc7bd57b2d1c4

4 years agoFurther fixes for ticket 5470
Mike Bayer [Thu, 13 Aug 2020 14:43:53 +0000 (10:43 -0400)] 
Further fixes for ticket 5470

The fix for #5470 didn't actually take into account that
the "distinct" logic in query was also doubling up the criteria.
Added many more tests.   the 1.3 version here will be different
than 1.4 as the regression is not quite the same.

Fixes: #5470
Change-Id: I16a23917cab175761de9c867d9d9ac55031d9b97

4 years agoUse importlib_metadata; add namespace for mariadb
Mike Bayer [Wed, 12 Aug 2020 22:46:25 +0000 (18:46 -0400)] 
Use importlib_metadata; add namespace for mariadb

The ``importlib_metadata`` library is used to scan for setuptools
entrypoints rather than pkg_resources.   as importlib_metadata is a small
library that is included as of Python 3.8, the compatibility library is
installed as a dependency for Python versions older than 3.8.

Unfortunately setuptools "attr:" is broken because it tries to import
the module; seems like this is fixed as part of
https://github.com/pypa/setuptools/pull/1753 however this is too recent
to rely upon for now.

Added a new dialect token "mariadb" that may be used in place of "mysql" in
the :func:`_sa.create_engine` URL.  This will deliver a MariaDB dialect
subclass of the MySQLDialect in use that forces the "is_mariadb" flag to
True.  The dialect will raise an error if a server version string that does
not indicate MariaDB in use is received.   This is useful for
MariaDB-specific testing scenarios as well as to support applications that
are hardcoding to MariaDB-only concepts.  As MariaDB and MySQL featuresets
and usage patterns continue to diverge, this pattern may become more
prominent.

Fixes: #5400
Fixes: #5496
Change-Id: I330815ebe572b6a9818377da56621397335fa702

4 years agoSweep through UPDATE ordered_values a second time
Mike Bayer [Thu, 13 Aug 2020 00:14:15 +0000 (20:14 -0400)] 
Sweep through UPDATE ordered_values a second time

The fix in 180ae7c1a53385f72b0047496ac001ec5099cc3e
didn't do much as the code was not preserving parameter
order at all, in fact.    Reworked stmt_parameters to be
delivered in the correct order up front and preserve
throughout crud.py which was not being done at all
before.

Fixes: #5510
Change-Id: I0795c71df73005a25d1bbf216732d41b41e11a5f

4 years agoMerge "Break scalars() and mappings() into separate objects"
mike bayer [Wed, 12 Aug 2020 16:40:53 +0000 (16:40 +0000)] 
Merge "Break scalars() and mappings() into separate objects"

4 years agoBreak scalars() and mappings() into separate objects
Mike Bayer [Mon, 10 Aug 2020 22:40:49 +0000 (18:40 -0400)] 
Break scalars() and mappings() into separate objects

The issue of Result.fetchXXX()  methods returning Row
objects unless filtering is applied will not provide a
clear enough API story when type annotations are applied,
so break out scalars/mappings into separate wrapper objects.
this makes some things more intuitive and other things a little
more bumpy.   however the return type story is now clearer.

Fixes: #5503
Change-Id: I629a061823179680dc0723559183859a67ea4db1

4 years agoMerge "Fix mysql CREATE TABLE / COLLATE issue"
mike bayer [Wed, 12 Aug 2020 15:04:21 +0000 (15:04 +0000)] 
Merge "Fix mysql CREATE TABLE / COLLATE issue"

4 years agoCorrect for update.ordered_values() and use in new test
Mike Bayer [Tue, 11 Aug 2020 21:46:11 +0000 (17:46 -0400)] 
Correct for update.ordered_values() and use in new test

The test for the parameter fix in c0685e5f41 was not working
deterministically on Python 2, so use ordered_values(), however
a second issue in ordered_values() was assuming each element was a
column, so also test for array-assignment expressions with
ordered_values.

Change-Id: I944c72a52700ffb4ab5ae1a83ae21f1efc84b505

4 years agoupdate deterministic sort ordering doc
Mike Bayer [Tue, 11 Aug 2020 16:27:10 +0000 (12:27 -0400)] 
update deterministic sort ordering doc

reword the sorting in terms of the actual behavior,
put correct changed version

References: #5494
Change-Id: I725338526afe28454910d029c153e4476f8c686f

4 years agoFix mysql CREATE TABLE / COLLATE issue
Gord Thompson [Thu, 6 Aug 2020 23:19:52 +0000 (17:19 -0600)] 
Fix mysql CREATE TABLE / COLLATE issue

Fixes: #5411
Change-Id: Ib0c53f5ed3f9d3ff0586580c9a9cce73b4b870f4

4 years agoFix typos 5502/head
Karthikeyan Singaravelan [Sun, 9 Aug 2020 10:02:57 +0000 (10:02 +0000)] 
Fix typos

4 years agorender INSERT/UPDATE column expressions up front; pass state
Mike Bayer [Sat, 8 Aug 2020 17:03:17 +0000 (13:03 -0400)] 
render INSERT/UPDATE column expressions up front; pass state

Fixes related to rendering of complex UPDATE DML
which was not correctly preserving positional parameter
order in conjunction with DML features that are only known
to work on the PostgreSQL database.    Both pg8000
and asyncpg use positional parameters which is why these
issues are suddenly apparent.

crud.py now takes on the task of rendering the column
expressions for SET or VALUES so that for the very unusual
case that the column expression is a compound expression
that includes a bound parameter (namely an array index),
the bound parameter order is preserved.

Additionally, crud.py passes through the positional_names
keyword argument into bindparam_string() which is necessary
when CTEs are being rendered, as PG supports complex
CTE / INSERT / UPDATE scenarios.

Change-Id: I7f03920500e19b721636b84594de78a5bfdcbc82

4 years agoDon't link on_connect to first_connect event handler
Mike Bayer [Fri, 7 Aug 2020 18:51:33 +0000 (14:51 -0400)] 
Don't link on_connect to first_connect event handler

Adjusted the dialect initialization process such that the
:meth:`_engine.Dialect.on_connect` is not called a second time on the first
connection.   The hook is called first, then the
:meth:`_engine.Dialect.initialize` is called if that connection is the
first for that dialect, then no more events are called.   This eliminates
the two calls to the "on_connect" function which can produce very difficult
debugging situations.

Fixes: #5497
Change-Id: Icefc2e884e30ee7b4ac84b99dc54bf992a6085e3

4 years agoMerge "Add complete platform data to profiling data"
mike bayer [Fri, 7 Aug 2020 17:27:15 +0000 (17:27 +0000)] 
Merge "Add complete platform data to profiling data"

4 years agoMerge "Pass schema_translate_map from DDLCompiler to SQLCompiler"
mike bayer [Fri, 7 Aug 2020 17:22:14 +0000 (17:22 +0000)] 
Merge "Pass schema_translate_map from DDLCompiler to SQLCompiler"

4 years agoInclude bulk update/delete in RoutingSession example
Mike Bayer [Fri, 7 Aug 2020 16:32:50 +0000 (12:32 -0400)] 
Include bulk update/delete in RoutingSession example

Fixes: #5407
Change-Id: Ia0965dbc88d744cded5c23021898388f2cf95f8d

4 years agoAdd complete platform data to profiling data
Federico Caselli [Mon, 27 Jul 2020 19:57:32 +0000 (21:57 +0200)] 
Add complete platform data to profiling data

Initially to distinsuish between arm and x86_64
architecture, expand out the profile key to include
machine, system, python impl in all cases.

Ref: #5436
Change-Id: I7e48f0462ba7d9c680b2dac45ce7b0cf709b9b22

4 years agoPass schema_translate_map from DDLCompiler to SQLCompiler
Mike Bayer [Fri, 7 Aug 2020 15:24:29 +0000 (11:24 -0400)] 
Pass schema_translate_map from DDLCompiler to SQLCompiler

Fixed issue where the
:paramref:`_engine.Connection.execution_options.schema_translate_map`
feature would not take effect when the :meth:`_schema.Sequence.next_value`
function function for a :class:`_schema.Sequence` were used in the
:paramref:`_schema.Column.server_default` parameter and the create table
DDL were emitted.

Fixes: #5500
Change-Id: I74a9fa13d22749d06c8202669f9ea220d9d984d9

4 years agobase all_orm_descriptors ordering on cls.__dict__ + cls.__mro__
Mike Bayer [Thu, 6 Aug 2020 19:53:17 +0000 (15:53 -0400)] 
base all_orm_descriptors ordering on cls.__dict__ + cls.__mro__

Adjusted the workings of the :meth:`_orm.Mapper.all_orm_descriptors`
accessor to represent the attributes in the order that they are located in
a deterministic way, assuming the use of Python 3.6 or higher which
maintains the sorting order of class attributes based on how they were
declared.   This sorting is not guaranteed to match the declared order of
attributes in all cases however; see the method documentation for the exact
scheme.

Fixes: #5494
Change-Id: I6ee8d4ace3eb8b3f7c9c0f2a3d7e27b5f62abfd3

4 years agorevise asyncio verbiage a bit
Mike Bayer [Thu, 6 Aug 2020 14:16:38 +0000 (10:16 -0400)] 
revise asyncio verbiage a bit

Change-Id: I8bdf7c3271b8284ab82e01558024f933e1ee7b49

4 years agoMerge "Documentation updates for 1.4"
mike bayer [Thu, 6 Aug 2020 03:33:37 +0000 (03:33 +0000)] 
Merge "Documentation updates for 1.4"

4 years agoMerge "Implement relationship AND criteria; global loader criteria"
mike bayer [Thu, 6 Aug 2020 03:33:13 +0000 (03:33 +0000)] 
Merge "Implement relationship AND criteria; global loader criteria"

4 years agoDocumentation updates for 1.4
Mike Bayer [Sun, 28 Jun 2020 15:59:34 +0000 (11:59 -0400)] 
Documentation updates for 1.4

* major additions to 1.4 migration doc; removed additional
  verbosity regarding caching methodology and reorganized the
  doc to present itself more as a "what's changed" guide

* as we now have a path for asyncio, update that doc so that
  we aren't spreading obsolete information

* updates to the 2.0 migration guide with latest info, however
  this is still an architecture doc and not a migration guide
  yet, will need further rework.

* start really talking about 1.x vs. 2.0 style everywhere.  Querying
  is most of the docs so this is going to be a prominent
  theme, start getting it to fit in

* Add introductory documentation for ORM example sections as these
  are too sparse

* new documentation for do_orm_execute(), many separate sections,
  adding deprecation notes to before_compile() and similar

* new example suites to illustrate do_orm_execute(),
  with_loader_criteria()

* modernized horizontal sharding examples and added a separate
  example to distinguish between multiple databases and single
  database w/ multiple tables use case

* introducing DEEP ALCHEMY, will use zzzeeksphinx 1.1.6

* no name for the alchemist yet however the dragon's name
  is Flambé

Change-Id: Id6b5c03b1ce9ddb7b280f66792212a0ef0a1c541

4 years agoImplement relationship AND criteria; global loader criteria
Mike Bayer [Thu, 6 Aug 2020 01:47:43 +0000 (21:47 -0400)] 
Implement relationship AND criteria; global loader criteria

Added the ability to add arbitrary criteria to the ON clause generated
by a relationship attribute in a query, which applies to methods such
as :meth:`_query.Query.join` as well as loader options like
:func:`_orm.joinedload`.   Additionally, a "global" version of the option
allows limiting criteria to be applied to particular entities in
a query globally.

Documentation is minimal at this point, new examples will
be coming in a subsequent commit.

Some adjustments to execution options in how they are represented
in the ORMExecuteState as well as well as a few ORM tests that
forgot to get merged in a preceding commit.

Fixes: #4472
Change-Id: I2b8fc57092dedf35ebd16f6343ad0f0d7d332beb