2.0.11
2.0.11
Released: April 26, 2023
orm
-
[orm] [usecase] The
ORM bulk INSERT and UPDATE <orm_expression_update_delete>
features now add these capabilities:- The requirement that extra parameters aren't passed when using ORM INSERT using the "orm" dml_strategy setting is lifted. - The requirement that additional WHERE criteria is not passed when using ORM UPDATE using the "bulk" dml_strategy setting is lifted. Note that in this case, the check for expected row count is turned off. -
[orm] [bug] Fixed 2.0 regression where use of
_sql.bindparam()inside of
_dml.Insert.values()would fail to be interpreted correctly when
executing the_dml.Insertstatement using the ORM
_orm.Session, due to the new
ORM-enabled insert feature <orm_queryguide_bulk_insert>not
implementing this use case.
engine
-
[engine] [performance] A series of performance enhancements to
_engine.Row:- `__getattr__` performance of the row's "named tuple" interface has been improved; within this change, the `_engine.Row` implementation has been streamlined, removing constructs and logic that were specific to the 1.4 and prior series of SQLAlchemy. As part of this change, the serialization format of `_engine.Row` has been modified slightly, however rows which were pickled with previous SQLAlchemy 2.0 releases will be recognized within the new format. Pull request courtesy J. Nick Koston. - Improved row processing performance for "binary" datatypes by making the "bytes" handler conditional on a per driver basis. As a result, the "bytes" result handler has been removed for nearly all drivers other than psycopg2, all of which in modern forms support returning Python "bytes" directly. Pull request courtesy J. Nick Koston. - Additional refactorings inside of `_engine.Row` to improve performance by Federico Caselli. -
[engine] [bug] [regression] Fixed regression which prevented the
_engine.URL.normalized_query
attribute of_engine.URLfrom functioning.References: #9682
sql
-
[sql] [usecase] Added support for slice access with
ColumnCollection, e.g.
table.c[0:5],subquery.c[:-1]etc. Slice access returns a sub
ColumnCollectionin the same way as passing a tuple of keys. This
is a natural continuation of the key-tuple access added for #8285,
where it appears to be an oversight that the slice access use case was
omitted.References: #8285
typing
-
[typing] [bug] Improved typing of
_engine.RowMappingto indicate that it
support also_schema.Columnas index objects, not only
string names. Pull request courtesy Andy Freeland.References: #9644
postgresql
-
[postgresql] [bug] [regression] Fixed critical regression caused by #9618, which modified the
architecture of the :term:insertmanyvaluesfeature for 2.0.10, which
caused floating point values to lose all decimal places when being inserted
using the insertmanyvalues feature with either the psycopg2 or psycopg
drivers.Unknown interpreted text role "term".
References: #9701
mssql
- [mssql] [bug] Implemented the
_sqltypes.Doubletype for SQL Server, where it
will renderDOUBLE PRECISIONat DDL time. This is implemented using
a new MSSQL datatype_mssql.DOUBLE_PRECISIONwhich also may
be used directly.
oracle
- [oracle] [bug] Fixed issue in Oracle dialects where
Decimalreturning types such as
_sqltypes.Numericwould return floating point values, rather than
Decimalobjects, when these columns were used in the
_dml.Insert.returning()clause to return INSERTed values.