<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/sql, branch ticket_5648</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>Allow custom sorting of column in the ORM.</title>
<updated>2023-02-17T00:21:43+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2023-02-16T20:52:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=361beb0bc8392c92403ffc1999eb2a9847e945c7'/>
<id>361beb0bc8392c92403ffc1999eb2a9847e945c7</id>
<content type='text'>
To accommodate a change in column ordering used by ORM Declarative in
SQLAlchemy 2.0, a new parameter :paramref:`_orm.mapped_column.sort_order`
has been added that can be used to control the order of the columns defined
in the table by the ORM, for common use cases such as mixins with primary
key columns that should appear first in tables. The change notes at
:ref:`change_9297` illustrate the default change in ordering behavior
(which is part of all SQLAlchemy 2.0 releases) as well as use of the
:paramref:`_orm.mapped_column.sort_order` to control column ordering when
using mixins and multiple classes (new in 2.0.4).

Fixes: #9297
Change-Id: Ic7163d64efdc0eccb53d6ae0dd89ec83427fb675
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To accommodate a change in column ordering used by ORM Declarative in
SQLAlchemy 2.0, a new parameter :paramref:`_orm.mapped_column.sort_order`
has been added that can be used to control the order of the columns defined
in the table by the ORM, for common use cases such as mixins with primary
key columns that should appear first in tables. The change notes at
:ref:`change_9297` illustrate the default change in ordering behavior
(which is part of all SQLAlchemy 2.0 releases) as well as use of the
:paramref:`_orm.mapped_column.sort_order` to control column ordering when
using mixins and multiple classes (new in 2.0.4).

Fixes: #9297
Change-Id: Ic7163d64efdc0eccb53d6ae0dd89ec83427fb675
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "modernize hybrids and apply typing" into main</title>
<updated>2023-02-17T00:20:00+00:00</updated>
<author>
<name>mike bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-17T00:20:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=fa1026cd7c24d4b6e1bc2dba6e0f3d83fb8cf064'/>
<id>fa1026cd7c24d4b6e1bc2dba6e0f3d83fb8cf064</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>modernize hybrids and apply typing</title>
<updated>2023-02-16T23:01:31+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-16T14:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=81993801dd39dd4a5973f8500e849f35ac07f2f3'/>
<id>81993801dd39dd4a5973f8500e849f35ac07f2f3</id>
<content type='text'>
Improved the typing support for the :ref:`hybrids_toplevel`
extension, updated all documentation to use ORM Annotated Declarative
mappings, and added a new modifier called :attr:`.hybrid_property.inplace`.
This modifier provides a way to alter the state of a :class:`.hybrid_property`
**in place**, which is essentially what very early versions of hybrids
did, before SQLAlchemy version 1.2.0 :ticket:`3912` changed this to
remove in-place mutation.  This in-place mutation is now restored on an
**opt-in** basis to allow a single hybrid to have multiple methods
set up, without the need to name all the methods the same and without the
need to carefully "chain" differently-named methods in order to maintain
the composition.  Typing tools such as Mypy and Pyright do not allow
same-named methods on a class, so with this change a succinct method
of setting up hybrids with typing support is restored.

Change-Id: Iea88025f023428f9f006846d09fbb4be391f5ebb
References: #9321
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improved the typing support for the :ref:`hybrids_toplevel`
extension, updated all documentation to use ORM Annotated Declarative
mappings, and added a new modifier called :attr:`.hybrid_property.inplace`.
This modifier provides a way to alter the state of a :class:`.hybrid_property`
**in place**, which is essentially what very early versions of hybrids
did, before SQLAlchemy version 1.2.0 :ticket:`3912` changed this to
remove in-place mutation.  This in-place mutation is now restored on an
**opt-in** basis to allow a single hybrid to have multiple methods
set up, without the need to name all the methods the same and without the
need to carefully "chain" differently-named methods in order to maintain
the composition.  Typing tools such as Mypy and Pyright do not allow
same-named methods on a class, so with this change a succinct method
of setting up hybrids with typing support is restored.

Change-Id: Iea88025f023428f9f006846d09fbb4be391f5ebb
References: #9321
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix coercion issue for tuple bindparams</title>
<updated>2023-02-16T02:47:45+00:00</updated>
<author>
<name>mike bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-15T22:20:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=693f7f7a84ac77eaacc9ff9c8035a249d7f1ce7e'/>
<id>693f7f7a84ac77eaacc9ff9c8035a249d7f1ce7e</id>
<content type='text'>
Fixed issue where element types of a tuple value would be hardcoded to take
on the types from a compared-to tuple, when the comparison were using the
:meth:`.ColumnOperators.in_` operator. This was inconsistent with the usual
way that types are determined for a binary expression, which is that the
actual element type on the right side is considered first before applying
the left-hand-side type.

Fixes: #9313
Change-Id: Ia8874c09682a6512fcf4084cf14481024959c461
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed issue where element types of a tuple value would be hardcoded to take
on the types from a compared-to tuple, when the comparison were using the
:meth:`.ColumnOperators.in_` operator. This was inconsistent with the usual
way that types are determined for a binary expression, which is that the
actual element type on the right side is considered first before applying
the left-hand-side type.

Fixes: #9313
Change-Id: Ia8874c09682a6512fcf4084cf14481024959c461
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Add ``Table.autoincrement_column``" into main</title>
<updated>2023-02-15T18:19:18+00:00</updated>
<author>
<name>mike bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-15T18:19:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e7de31117ef65a449ee2c07e22ae8607aad3e9a9'/>
<id>e7de31117ef65a449ee2c07e22ae8607aad3e9a9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ``Table.autoincrement_column``</title>
<updated>2023-02-14T19:45:49+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2023-02-10T20:37:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3d00c101be9feb73b87b8ad07ddc5bc14cd94cdb'/>
<id>3d00c101be9feb73b87b8ad07ddc5bc14cd94cdb</id>
<content type='text'>
Added public property :attr:`_sql.Table.autoincrement_column` that
returns the column identified as autoincrementing in the column.

Fixes: #9277
Change-Id: If60d6f92e0df94f57d00ff6d89d285c61b02f5a4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added public property :attr:`_sql.Table.autoincrement_column` that
returns the column identified as autoincrementing in the column.

Fixes: #9277
Change-Id: If60d6f92e0df94f57d00ff6d89d285c61b02f5a4
</pre>
</div>
</content>
</entry>
<entry>
<title>completely lift-and-copy and_ / or_ documentation</title>
<updated>2023-02-13T17:23:28+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-13T17:23:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=7832e8d4e6ac87619acd4c348bdb0590eb60af43'/>
<id>7832e8d4e6ac87619acd4c348bdb0590eb60af43</id>
<content type='text'>
Sphinx refuses to write the correct docstring for these without
placing a completely literal string with no interpolation of
any kind.   Current site has blank for these.

Change-Id: Ie19a0b89d05b45509708585e6efca1a35f30adb5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sphinx refuses to write the correct docstring for these without
placing a completely literal string with no interpolation of
any kind.   Current site has blank for these.

Change-Id: Ie19a0b89d05b45509708585e6efca1a35f30adb5
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix docs for `case` expression to match new syntax (#9279)</title>
<updated>2023-02-10T21:56:30+00:00</updated>
<author>
<name>Abdulhaq Emhemmed</name>
<email>el.ingeniero09@gmail.com</email>
</author>
<published>2023-02-10T21:56:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=b95b22d8c0f9f26e33e1912d8ee205319fc20362'/>
<id>b95b22d8c0f9f26e33e1912d8ee205319fc20362</id>
<content type='text'>
* Fix docs for `case` expression to match new syntax

Previously (before v1.4), the `whens` arg (when `value` is *not* used) used to be a list of
conditions (a 2 item-tuple of condition + value). From v1.4, these are passed
as positional args and the old syntax is not supported anymore.

* Fix long lines</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix docs for `case` expression to match new syntax

Previously (before v1.4), the `whens` arg (when `value` is *not* used) used to be a list of
conditions (a 2 item-tuple of condition + value). From v1.4, these are passed
as positional args and the old syntax is not supported anymore.

* Fix long lines</pre>
</div>
</content>
</entry>
<entry>
<title>generalize adapt_on_names to expect non-named elements</title>
<updated>2023-02-10T15:42:11+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-10T13:39:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=eb0861e8e69f8ce702301c558e552e1aeb2e9eba'/>
<id>eb0861e8e69f8ce702301c558e552e1aeb2e9eba</id>
<content type='text'>
The fix in #9217 opened up adapt_on_names to more kinds of
expressions than it was prepared for; adjust that logic
and also refine in the ORM where we are using it, as we
dont need it (yet) for the DML RETURNING use case.

Fixed regression introduced in version 2.0.2 due to :ticket:`9217` where
using DML RETURNING statements, as well as
:meth:`_sql.Select.from_statement` constructs as was "fixed" in
:ticket:`9217`, in conjunction with ORM mapped classes that used
expressions such as with :func:`_orm.column_property`, would lead to an
internal error within Core where it would attempt to match the expression
by name. The fix repairs the Core issue, and also adjusts the fix in
:ticket:`9217` to not take effect for the DML RETURNING use case, where it
adds unnecessary overhead.

Fixes: #9273
Change-Id: Ie0344efb12ff7df48f21e71e62dc598c76a6a0de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fix in #9217 opened up adapt_on_names to more kinds of
expressions than it was prepared for; adjust that logic
and also refine in the ORM where we are using it, as we
dont need it (yet) for the DML RETURNING use case.

Fixed regression introduced in version 2.0.2 due to :ticket:`9217` where
using DML RETURNING statements, as well as
:meth:`_sql.Select.from_statement` constructs as was "fixed" in
:ticket:`9217`, in conjunction with ORM mapped classes that used
expressions such as with :func:`_orm.column_property`, would lead to an
internal error within Core where it would attempt to match the expression
by name. The fix repairs the Core issue, and also adjusts the fix in
:ticket:`9217` to not take effect for the DML RETURNING use case, where it
adds unnecessary overhead.

Fixes: #9273
Change-Id: Ie0344efb12ff7df48f21e71e62dc598c76a6a0de
</pre>
</div>
</content>
</entry>
<entry>
<title>apply self_group to all elements of multi-expression</title>
<updated>2023-02-09T21:45:14+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-09T20:36:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=6971ba97247928c9a79f532001278d0e1d5845fc'/>
<id>6971ba97247928c9a79f532001278d0e1d5845fc</id>
<content type='text'>
Fixed critical regression in SQL expression formulation in the 2.0 series
due to :ticket:`7744` which improved support for SQL expressions that
contained many elements against the same operator repeatedly; parenthesis
grouping would be lost with expression elements beyond the first two
elements.

Fixes: #9271
Change-Id: Ib6ed5b71efe0f6816dab75bda622297fc89e3b49
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed critical regression in SQL expression formulation in the 2.0 series
due to :ticket:`7744` which improved support for SQL expressions that
contained many elements against the same operator repeatedly; parenthesis
grouping would be lost with expression elements beyond the first two
elements.

Fixes: #9271
Change-Id: Ib6ed5b71efe0f6816dab75bda622297fc89e3b49
</pre>
</div>
</content>
</entry>
</feed>
