From: Mike Bayer Date: Sun, 12 Oct 2025 05:43:48 +0000 (-0400) Subject: doc tweaks X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=938d70ae82441ebd48cb0f059823b8b39529f0cb;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git doc tweaks Change-Id: I7d445cd98db7edefe705ee4eb2cd24cad72040f3 --- diff --git a/doc/build/conf.py b/doc/build/conf.py index 50006f8616..070eba23f4 100644 --- a/doc/build/conf.py +++ b/doc/build/conf.py @@ -477,3 +477,14 @@ epub_copyright = "2007-2015, SQLAlchemy authors" # Allow duplicate toc entries. # epub_tocdup = True + + +def setup(app): # noqa: U100 + """Sphinx setup hook to configure documentation build.""" + + # delete class attributes with a value, where the value has ``__doc__`` + # defined, but we want to see only the docstring under the attribute + # itself. + from sqlalchemy.ext.asyncio import AsyncSession + + del AsyncSession.sync_session_class diff --git a/doc/build/core/connections.rst b/doc/build/core/connections.rst index 86e27a280e..54d6f4560e 100644 --- a/doc/build/core/connections.rst +++ b/doc/build/core/connections.rst @@ -1987,7 +1987,7 @@ degrade to "non-batched" mode which runs individual INSERT statements for each parameter set. For example, on SQL Server when an auto incrementing ``IDENTITY`` column is -used as the primary key, the following SQL form is used: +used as the primary key, the following SQL form is used [#]_: .. sourcecode:: sql @@ -2039,27 +2039,31 @@ of **non-batched** mode when guaranteed RETURNING ordering is requested. .. seealso:: + .. [#] - * Microsoft SQL Server rationale + * Microsoft SQL Server rationale + + "INSERT queries that use SELECT with ORDER BY to populate rows guarantees + how identity values are computed but not the order in which the rows are inserted." + https://learn.microsoft.com/en-us/sql/t-sql/statements/insert-transact-sql?view=sql-server-ver16#limitations-and-restrictions - "INSERT queries that use SELECT with ORDER BY to populate rows guarantees - how identity values are computed but not the order in which the rows are inserted." - https://learn.microsoft.com/en-us/sql/t-sql/statements/insert-transact-sql?view=sql-server-ver16#limitations-and-restrictions + .. [#] - * PostgreSQL batched INSERT Discussion + * PostgreSQL batched INSERT Discussion - Original description in 2018 https://www.postgresql.org/message-id/29386.1528813619@sss.pgh.pa.us + Original description in 2018 https://www.postgresql.org/message-id/29386.1528813619@sss.pgh.pa.us - Follow up in 2023 - https://www.postgresql.org/message-id/be108555-da2a-4abc-a46b-acbe8b55bd25%40app.fastmail.com + Follow up in 2023 - https://www.postgresql.org/message-id/be108555-da2a-4abc-a46b-acbe8b55bd25%40app.fastmail.com .. [#] - * MariaDB AUTO_INCREMENT behavior (using the same InnoDB engine as MySQL): + * MariaDB AUTO_INCREMENT behavior (using the same InnoDB engine as MySQL) + + https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html - https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html + https://dba.stackexchange.com/a/72099 - https://dba.stackexchange.com/a/72099 .. _engine_insertmanyvalues_non_batch: diff --git a/doc/build/core/selectable.rst b/doc/build/core/selectable.rst index 886bb1dfda..d7c2b56c8b 100644 --- a/doc/build/core/selectable.rst +++ b/doc/build/core/selectable.rst @@ -123,7 +123,7 @@ The classes here are generated using the constructors listed at .. autoclass:: Select :members: :inherited-members: ClauseElement - :exclude-members: memoized_attribute, memoized_instancemethod, append_correlation, append_column, append_prefix, append_whereclause, append_having, append_from, append_order_by, append_group_by + :exclude-members: __new__, memoized_attribute, memoized_instancemethod, append_correlation, append_column, append_prefix, append_whereclause, append_having, append_from, append_order_by, append_group_by .. autoclass:: Selectable @@ -133,7 +133,7 @@ The classes here are generated using the constructors listed at .. autoclass:: SelectBase :members: :inherited-members: ClauseElement - :exclude-members: memoized_attribute, memoized_instancemethod + :exclude-members: __new__, memoized_attribute, memoized_instancemethod .. autoclass:: Subquery :members: diff --git a/doc/build/orm/extensions/asyncio.rst b/doc/build/orm/extensions/asyncio.rst index b06fb6315f..bd14d6f2d2 100644 --- a/doc/build/orm/extensions/asyncio.rst +++ b/doc/build/orm/extensions/asyncio.rst @@ -1172,9 +1172,6 @@ ORM Session API Documentation .. autoclass:: AsyncSession :members: - :exclude-members: sync_session_class - - .. autoattribute:: sync_session_class .. autoclass:: AsyncSessionTransaction :members: