Skip to content

2.0.11

Choose a tag to compare

@sqla-tester sqla-tester released this 27 Apr 01:55
· 1774 commits to main since this release

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.
    

    References: #9583, #9595

  • [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.Insert statement using the ORM
    _orm.Session, due to the new
    ORM-enabled insert feature <orm_queryguide_bulk_insert> not
    implementing this use case.

    References: #9583, #9595

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.
    

    References: #9678, #9680

  • [engine] [bug] [regression] Fixed regression which prevented the _engine.URL.normalized_query
    attribute of _engine.URL from 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
    ColumnCollection in 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.RowMapping to indicate that it
    support also _schema.Column as 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:insertmanyvalues feature 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.Double type for SQL Server, where it
    will render DOUBLE PRECISION at DDL time. This is implemented using
    a new MSSQL datatype _mssql.DOUBLE_PRECISION which also may
    be used directly.

oracle

  • [oracle] [bug] Fixed issue in Oracle dialects where Decimal returning types such as
    _sqltypes.Numeric would return floating point values, rather than
    Decimal objects, when these columns were used in the
    _dml.Insert.returning() clause to return INSERTed values.