diff options
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r-- | lib/sqlalchemy/sql/dml.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/functions.py | 3 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 17 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/type_api.py | 10 |
4 files changed, 19 insertions, 15 deletions
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index e99f35418..76a16eb1c 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -590,8 +590,8 @@ class UpdateBase( @property def entity_description(self) -> Dict[str, Any]: - """Return a :term:`plugin-enabled` description of the table and/or entity - which this DML construct is operating against. + """Return a :term:`plugin-enabled` description of the table and/or + entity which this DML construct is operating against. This attribute is generally useful when using the ORM, as an extended structure which includes information about mapped diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index befd262ec..77c93aed6 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -462,7 +462,8 @@ class FunctionElement(Executable, ColumnElement[_T], FromClause, Generative): return FunctionFilter(self, *criterion) def as_comparison(self, left_index, right_index): - """Interpret this expression as a boolean comparison between two values. + """Interpret this expression as a boolean comparison between two + values. This method is used for an ORM use case described at :ref:`relationship_custom_operator_sql_function`. diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index ce561697b..a6047bec1 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -1807,8 +1807,8 @@ class TableValuedAlias(LateralFromClause, Alias): return tva def lateral(self, name: Optional[str] = None) -> LateralFromClause: - """Return a new :class:`_sql.TableValuedAlias` with the lateral flag set, - so that it renders as LATERAL. + """Return a new :class:`_sql.TableValuedAlias` with the lateral flag + set, so that it renders as LATERAL. .. seealso:: @@ -5280,10 +5280,9 @@ class Select( *, full: bool = False, ) -> SelfSelect: - r"""Create a SQL LEFT OUTER JOIN against this :class:`_expression.Select` - object's criterion - and apply generatively, returning the newly resulting - :class:`_expression.Select`. + r"""Create a SQL LEFT OUTER JOIN against this + :class:`_expression.Select` object's criterion and apply generatively, + returning the newly resulting :class:`_expression.Select`. Usage is the same as that of :meth:`_selectable.Select.join_from`. @@ -6559,7 +6558,8 @@ class Exists(UnaryExpression[bool]): self: SelfExists, *fromclauses: Union[Literal[None, False], _FromClauseArgument], ) -> SelfExists: - """Apply correlation to the subquery noted by this :class:`_sql.Exists`. + """Apply correlation to the subquery noted by this + :class:`_sql.Exists`. .. seealso:: @@ -6576,7 +6576,8 @@ class Exists(UnaryExpression[bool]): self: SelfExists, *fromclauses: Union[Literal[None, False], _FromClauseArgument], ) -> SelfExists: - """Apply correlation to the subquery noted by this :class:`_sql.Exists`. + """Apply correlation to the subquery noted by this + :class:`_sql.Exists`. .. seealso:: diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index 6c1a99daa..90320701e 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -290,8 +290,8 @@ class TypeEngine(Visitable, Generic[_T]): ] = util.EMPTY_DICT def evaluates_none(self: SelfTypeEngine) -> SelfTypeEngine: - """Return a copy of this type which has the :attr:`.should_evaluate_none` - flag set to True. + """Return a copy of this type which has the + :attr:`.should_evaluate_none` flag set to True. E.g.:: @@ -1356,7 +1356,8 @@ class Emulated(TypeEngineMixin): impltype: Type[Union[TypeEngine[Any], TypeEngineMixin]], **kw: Any, ) -> TypeEngine[Any]: - """Given an impl class, adapt this type to the impl assuming "emulated". + """Given an impl class, adapt this type to the impl assuming + "emulated". The impl should also be an "emulated" version of this type, most likely the same class as this type itself. @@ -1428,7 +1429,8 @@ class NativeForEmulated(TypeEngineMixin): **kw: Any, ) -> TypeEngine[Any]: - """Given an impl, adapt this type's class to the impl assuming "native". + """Given an impl, adapt this type's class to the impl assuming + "native". The impl will be an :class:`.Emulated` class but not a :class:`.NativeForEmulated`. |