diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-05-10 16:44:02 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-05-10 16:44:02 -0400 |
commit | 32fc4f3de20c9d983742b064e47f591342c42de2 (patch) | |
tree | e30a246cc491b2bf322bb62b4d9276e5991ffd86 | |
parent | 4f52073370ae2a563fdc3fe05d87ee1ea4ee901d (diff) | |
download | sqlalchemy-32fc4f3de20c9d983742b064e47f591342c42de2.tar.gz |
add missing docs
ColumnExpressionArgument, as well as Oracle datatypes
mentioned in the changelog
Change-Id: I9496de9a1092af21f84492ff9d91a0cefb1a8a5b
-rw-r--r-- | doc/build/changelog/unreleased_20/9656.rst | 9 | ||||
-rw-r--r-- | doc/build/core/internals.rst | 2 | ||||
-rw-r--r-- | doc/build/core/sqlelement.rst | 13 | ||||
-rw-r--r-- | doc/build/dialects/oracle.rst | 12 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/_typing.py | 5 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 1 |
6 files changed, 34 insertions, 8 deletions
diff --git a/doc/build/changelog/unreleased_20/9656.rst b/doc/build/changelog/unreleased_20/9656.rst index 16c170aa8..1b00da816 100644 --- a/doc/build/changelog/unreleased_20/9656.rst +++ b/doc/build/changelog/unreleased_20/9656.rst @@ -2,7 +2,8 @@ :tags: typing, sql :tickets: 9656 - Added type ``ColumnExpressionArgument`` as a public alias of an internal - type. This type is useful since it's what' accepted by the sqlalchemy in - many api calls, such as :meth:`_sql.Select.where`, :meth:`_sql.and` and - many other. + Added type :data:`_sql.ColumnExpressionArgument` as a public-facing type + that indicates column-oriented arguments which are passed to SQLAlchemy + constructs, such as :meth:`_sql.Select.where`, :func:`_sql.and_` and + others. This may be used to add typing to end-user functions which call + these methods. diff --git a/doc/build/core/internals.rst b/doc/build/core/internals.rst index 26aa9831d..5146ef4af 100644 --- a/doc/build/core/internals.rst +++ b/doc/build/core/internals.rst @@ -70,5 +70,3 @@ Some key internal constructs are listed here. .. autoclass:: sqlalchemy.engine.AdaptedConnection :members: -.. autoattribute:: sqlalchemy.sql.ColumnExpressionArgument - :members: diff --git a/doc/build/core/sqlelement.rst b/doc/build/core/sqlelement.rst index 937840924..23dd2118b 100644 --- a/doc/build/core/sqlelement.rst +++ b/doc/build/core/sqlelement.rst @@ -150,12 +150,23 @@ The classes here are generated using the constructors listed at .. autoclass:: ColumnCollection :members: - .. autoclass:: ColumnElement :members: :inherited-members: :undoc-members: +.. data:: ColumnExpressionArgument + + General purpose "column expression" argument. + + .. versionadded:: 2.0.13 + + This type is used for "column" kinds of expressions that typically represent + a single SQL column expression, including :class:`_sql.ColumnElement`, as + well as ORM-mapped attributes that will have a ``__clause_element__()`` + method. + + .. autoclass:: ColumnOperators :members: :special-members: diff --git a/doc/build/dialects/oracle.rst b/doc/build/dialects/oracle.rst index 02f512214..8187e7147 100644 --- a/doc/build/dialects/oracle.rst +++ b/doc/build/dialects/oracle.rst @@ -44,6 +44,12 @@ construction arguments, are as follows: .. autoclass:: BFILE :members: __init__ +.. autoclass:: BINARY_DOUBLE + :members: __init__ + +.. autoclass:: BINARY_FLOAT + :members: __init__ + .. autoclass:: DATE :members: __init__ @@ -56,6 +62,9 @@ construction arguments, are as follows: .. autoclass:: NCLOB :members: __init__ +.. autoclass:: NVARCHAR2 + :members: __init__ + .. autoclass:: NUMBER :members: __init__ @@ -65,6 +74,9 @@ construction arguments, are as follows: .. autoclass:: RAW :members: __init__ +.. autoclass:: ROWID + :members: __init__ + .. autoclass:: TIMESTAMP :members: __init__ diff --git a/lib/sqlalchemy/sql/_typing.py b/lib/sqlalchemy/sql/_typing.py index 9e83c3f42..513ce78d4 100644 --- a/lib/sqlalchemy/sql/_typing.py +++ b/lib/sqlalchemy/sql/_typing.py @@ -186,8 +186,11 @@ typically represent a single SQL column expression, not a set of columns the way a table or ORM entity does. This includes ColumnElement, or ORM-mapped attributes that will have a -`__clause_element__()` method, it also has the ExpressionElementRole +``__clause_element__()`` method, it also has the ExpressionElementRole overall which brings in the TextClause object also. + +.. versionadded:: 2.0.13 + """ _ColumnExpressionOrLiteralArgument = Union[Any, _ColumnExpressionArgument[_T]] diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 4fa9cda00..f1cb4c276 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -61,6 +61,7 @@ from ._selectable_constructors import tablesample as tablesample from ._selectable_constructors import union as union from ._selectable_constructors import union_all as union_all from ._selectable_constructors import values as values +from ._typing import ColumnExpressionArgument as ColumnExpressionArgument from .base import _from_objects as _from_objects from .base import _select_iterables as _select_iterables from .base import ColumnCollection as ColumnCollection |