summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/selectable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-06-04 15:53:34 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-06-07 12:25:19 -0400
commit1c99edf1b988f55411bd8bef917b9664a39d218b (patch)
tree44789fc7380c469738ec15627e872bf3440e2a1b /lib/sqlalchemy/sql/selectable.py
parentcdafd5bb865e867660238b61e727d33ef6f42b37 (diff)
downloadsqlalchemy-1c99edf1b988f55411bd8bef917b9664a39d218b.tar.gz
migrate labels to new tutorial
other org changes and some sections from old tutorial ported to new tutorial. Change-Id: Ic0fba60ec82fff481890887beef9ed0fa271875a
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
-rw-r--r--lib/sqlalchemy/sql/selectable.py30
1 files changed, 10 insertions, 20 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index 53dcf51c7..fe19e2d7f 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -105,6 +105,7 @@ and_ = BooleanClauseList.and_
_T = TypeVar("_T", bound=Any)
if TYPE_CHECKING:
+ import sqlalchemy
from ._typing import _ColumnExpressionArgument
from ._typing import _FromClauseArgument
from ._typing import _JoinTargetArgument
@@ -129,7 +130,6 @@ if TYPE_CHECKING:
from .cache_key import _CacheKeyTraversalType
from .compiler import SQLCompiler
from .dml import Delete
- from .dml import Insert
from .dml import Update
from .elements import KeyedColumnElement
from .elements import Label
@@ -292,7 +292,7 @@ class Selectable(ReturnsRows):
.. seealso::
- :ref:`lateral_selects` - overview of usage.
+ :ref:`tutorial_lateral_correlation` - overview of usage.
"""
return Lateral._construct(self, name)
@@ -751,7 +751,7 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable):
.. seealso::
- :ref:`core_tutorial_aliases`
+ :ref:`tutorial_using_aliases`
:func:`_expression.alias`
@@ -1889,7 +1889,7 @@ class Lateral(FromClauseAlias, LateralFromClause):
.. seealso::
- :ref:`lateral_selects` - overview of usage.
+ :ref:`tutorial_lateral_correlation` - overview of usage.
"""
@@ -2059,7 +2059,7 @@ class CTE(
.. seealso::
- :ref:`core_tutorial_aliases`
+ :ref:`tutorial_using_aliases`
:func:`_expression.alias`
@@ -2992,7 +2992,7 @@ class TableClause(roles.DMLTableRole, Immutable, NamedFromClause):
c.table = self
@util.preload_module("sqlalchemy.sql.dml")
- def insert(self) -> Insert:
+ def insert(self) -> sqlalchemy.sql.expression.Insert:
"""Generate an :func:`_expression.insert` construct against this
:class:`_expression.TableClause`.
@@ -3176,7 +3176,7 @@ class Values(Generative, LateralFromClause):
.. seealso::
- :ref:`core_tutorial_aliases`
+ :ref:`tutorial_using_aliases`
:func:`_expression.alias`
@@ -3458,8 +3458,6 @@ class SelectBase(
:ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
- :ref:`scalar_selects` - in the 1.x tutorial
-
"""
if self._label_style is not LABEL_STYLE_NONE:
self = self.set_label_style(LABEL_STYLE_NONE)
@@ -3487,7 +3485,7 @@ class SelectBase(
.. seealso::
- :ref:`lateral_selects` - overview of usage.
+ :ref:`tutorial_lateral_correlation` - overview of usage.
"""
return Lateral._factory(self, name)
@@ -4966,8 +4964,6 @@ class Select(
:func:`_sql.select`
- :ref:`coretutorial_selecting` - in the 1.x tutorial
-
:ref:`tutorial_selecting_data` - in the 2.0 tutorial
"""
@@ -6018,7 +6014,7 @@ class Select(
:meth:`_expression.Select.correlate_except`
- :ref:`correlated_subqueries`
+ :ref:`tutorial_scalar_subquery`
"""
@@ -6068,7 +6064,7 @@ class Select(
:meth:`_expression.Select.correlate`
- :ref:`correlated_subqueries`
+ :ref:`tutorial_scalar_subquery`
"""
@@ -6341,8 +6337,6 @@ class ScalarSelect(
:ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
- :ref:`scalar_selects` - in the 1.x tutorial
-
"""
_traverse_internals: _TraverseInternalsType = [
@@ -6440,8 +6434,6 @@ class ScalarSelect(
:ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
- :ref:`correlated_subqueries` - in the 1.x tutorial
-
"""
self.element = cast("Select[Any]", self.element).correlate(
@@ -6479,8 +6471,6 @@ class ScalarSelect(
:ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
- :ref:`correlated_subqueries` - in the 1.x tutorial
-
"""