diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-06-04 15:53:34 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-06-07 12:22:42 -0400 |
| commit | 7eba007385a75aa0f29a1466cfbb335aa6abbe8b (patch) | |
| tree | 90aa6a1948adf52d5478e14eaab3aa15bade568a /lib/sqlalchemy/sql | |
| parent | 1936a9590bd7c06a917909c969858255012507ca (diff) | |
| download | sqlalchemy-7eba007385a75aa0f29a1466cfbb335aa6abbe8b.tar.gz | |
migrate labels to new tutorial
other org changes and some sections from old tutorial
ported to new tutorial.
Change-Id: Ic0fba60ec82fff481890887beef9ed0fa271875a
(Cherry-picked and independently modified)
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/dml.py | 30 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/elements.py | 28 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/functions.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 32 |
4 files changed, 28 insertions, 66 deletions
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index 4f3280373..dea5d6119 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -703,7 +703,7 @@ class ValuesBase(UpdateBase): .. seealso:: - :ref:`execute_multiple` - an introduction to + :ref:`tutorial_multiple_parameters` - an introduction to the traditional Core method of multiple parameter set invocation for INSERTs and other statements. @@ -974,9 +974,6 @@ class Insert(ValuesBase): .. seealso:: - :ref:`coretutorial_insert_expressions` - in the - :ref:`1.x tutorial <sqlexpression_toplevel>` - :ref:`tutorial_core_insert` - in the :ref:`unified_tutorial` @@ -1018,9 +1015,7 @@ class Insert(ValuesBase): .. seealso:: - :ref:`coretutorial_insert_expressions` - SQL Expression Tutorial - - :ref:`inserts_and_updates` - SQL Expression Tutorial + :ref:`tutorial_core_insert` - in the :ref:`unified_tutorial` """ super(Insert, self).__init__(table, values, prefixes) @@ -1135,16 +1130,6 @@ class DMLWhereBase(object): .. seealso:: - **1.x Tutorial Examples** - - :ref:`tutorial_1x_correlated_updates` - - :ref:`multi_table_updates` - - :ref:`multi_table_deletes` - - **2.0 Tutorial Examples** - :ref:`tutorial_correlated_updates` :ref:`tutorial_update_from` @@ -1276,15 +1261,6 @@ class Update(DMLWhereBase, ValuesBase): :meth:`_expression.TableClause.update` method on :class:`_schema.Table`. - .. seealso:: - - :ref:`inserts_and_updates` - in the - :ref:`1.x tutorial <sqlexpression_toplevel>` - - :ref:`tutorial_core_update_delete` - in the :ref:`unified_tutorial` - - - :param table: A :class:`_schema.Table` object representing the database table to be updated. @@ -1396,7 +1372,7 @@ class Update(DMLWhereBase, ValuesBase): .. seealso:: - :ref:`updates_order_parameters` - full example of the + :ref:`tutorial_parameter_ordered_updates` - full example of the :meth:`_expression.Update.ordered_values` method. .. versionchanged:: 1.4 The :meth:`_expression.Update.ordered_values` diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 0462b2648..42ec3e0e7 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -148,7 +148,7 @@ def literal(value, type_=None): def outparam(key, type_=None): - """Create an 'OUT' parameter for usage in functions (stored procedures), + r"""Create an 'OUT' parameter for usage in functions (stored procedures), for databases which support them. The ``outparam`` can be used like a regular function parameter. @@ -998,7 +998,7 @@ class ColumnElement( .. seealso:: - :ref:`coretutorial_casts` + :ref:`tutorial_casts` :func:`_expression.cast` @@ -1465,15 +1465,6 @@ class BindParameter(roles.InElementRole, ColumnElement): .. versionchanged:: 1.3 the "expanding" bound parameter feature now supports empty lists. - - .. seealso:: - - :ref:`coretutorial_bind_param` - - :ref:`coretutorial_insert_expressions` - - :func:`.outparam` - :param literal_execute: if True, the bound parameter will be rendered in the compile phase with a special "POSTCOMPILE" token, and the SQLAlchemy compiler will @@ -1495,6 +1486,11 @@ class BindParameter(roles.InElementRole, ColumnElement): :ref:`change_4808`. + .. seealso:: + + :ref:`tutorial_sending_parameters` - in the + :ref:`unified_tutorial` + """ if required is NO_ARG: required = value is NO_ARG and callable_ is None @@ -1906,7 +1902,7 @@ class TextClause( .. seealso:: - :ref:`sqlexpression_text` - in the Core tutorial + :ref:`tutorial_select_arbitrary_text` """ @@ -3057,7 +3053,7 @@ class Cast(WrapsColumnExpression, ColumnElement): .. seealso:: - :ref:`coretutorial_casts` + :ref:`tutorial_casts` :func:`.cast` @@ -3118,7 +3114,7 @@ class Cast(WrapsColumnExpression, ColumnElement): .. seealso:: - :ref:`coretutorial_casts` + :ref:`tutorial_casts` :func:`.type_coerce` - an alternative to CAST that coerces the type on the Python side only, which is often sufficient to generate the @@ -3239,7 +3235,7 @@ class TypeCoerce(WrapsColumnExpression, ColumnElement): .. seealso:: - :ref:`coretutorial_casts` + :ref:`tutorial_casts` :func:`.cast` @@ -4881,7 +4877,7 @@ class ColumnClause( :func:`_expression.text` - :ref:`sqlexpression_literal_column` + :ref:`tutorial_select_arbitrary_text` """ self.key = self.name = text diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index 584782b28..963108d7c 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -71,7 +71,7 @@ class FunctionElement(Executable, ColumnElement, FromClause, Generative): .. seealso:: - :ref:`coretutorial_functions` - in the Core tutorial + :ref:`tutorial_functions` - in the :ref:`unified_tutorial` :class:`.Function` - named SQL function. @@ -800,7 +800,7 @@ class _FunctionGenerator(object): .. seealso:: - :ref:`coretutorial_functions` - in the Core Tutorial + :ref:`tutorial_functions` - in the :ref:`unified_tutorial` :class:`.Function` diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 353f37b25..829f26030 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -170,7 +170,7 @@ class Selectable(ReturnsRows): .. seealso:: - :ref:`lateral_selects` - overview of usage. + :ref:`tutorial_lateral_correlation` - overview of usage. """ return Lateral._construct(self, name) @@ -607,7 +607,7 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable): .. seealso:: - :ref:`core_tutorial_aliases` + :ref:`tutorial_using_aliases` :func:`_expression.alias` @@ -1920,7 +1920,7 @@ class Lateral(AliasedReturnsRows): .. seealso:: - :ref:`lateral_selects` - overview of usage. + :ref:`tutorial_lateral_correlation` - overview of usage. """ @@ -1947,7 +1947,8 @@ class Lateral(AliasedReturnsRows): .. seealso:: - :ref:`lateral_selects` - overview of usage. + :ref:`tutorial_lateral_correlation` - overview of usage. + """ return coercions.expect( @@ -2129,7 +2130,7 @@ class CTE( .. seealso:: - :ref:`core_tutorial_aliases` + :ref:`tutorial_using_aliases` :func:`_expression.alias` @@ -2964,7 +2965,7 @@ class Values(Generative, FromClause): .. seealso:: - :ref:`core_tutorial_aliases` + :ref:`tutorial_using_aliases` :func:`_expression.alias` @@ -3201,8 +3202,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) @@ -3230,7 +3229,7 @@ class SelectBase( .. seealso:: - :ref:`lateral_selects` - overview of usage. + :ref:`tutorial_lateral_correlation` - overview of usage. """ return Lateral._factory(self, name) @@ -4848,8 +4847,6 @@ class Select( :func:`_sql.select` - :ref:`coretutorial_selecting` - in the 1.x tutorial - :ref:`tutorial_selecting_data` - in the 2.0 tutorial """ @@ -4956,8 +4953,7 @@ class Select( .. seealso:: - :ref:`coretutorial_selecting` - Core Tutorial description of - :func:`_expression.select`. + :ref:`tutorial_selecting_data` - in the :ref:`unified_tutorial` :param columns: A list of :class:`_expression.ColumnElement` or @@ -6078,7 +6074,7 @@ class Select( :meth:`_expression.Select.correlate_except` - :ref:`correlated_subqueries` + :ref:`tutorial_scalar_subquery` """ @@ -6116,7 +6112,7 @@ class Select( :meth:`_expression.Select.correlate` - :ref:`correlated_subqueries` + :ref:`tutorial_scalar_subquery` """ @@ -6559,8 +6555,6 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping): :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial - :ref:`scalar_selects` - in the 1.x tutorial - """ _from_objects = [] @@ -6619,8 +6613,6 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping): :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial - :ref:`correlated_subqueries` - in the 1.x tutorial - """ self.element = self.element.correlate(*fromclauses) @@ -6652,8 +6644,6 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping): :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial - :ref:`correlated_subqueries` - in the 1.x tutorial - """ |
