]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- some documentation hits
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Oct 2016 13:42:21 +0000 (09:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Oct 2016 13:42:21 +0000 (09:42 -0400)
Change-Id: I468fe70168804b08cf0d5e8b57e235bca904b1ff

doc/build/core/defaults.rst
doc/build/orm/extensions/declarative/mixins.rst
lib/sqlalchemy/ext/declarative/api.py
lib/sqlalchemy/sql/schema.py

index a7287a36082f98fe53ccba9c3a79c9d6929e65b5..b0001200ccff17565681bf58cb2358f120877f0a 100644 (file)
@@ -237,11 +237,6 @@ called out using :class:`.FetchedValue` as a marker::
         Column('def', String(20), server_onupdate=FetchedValue())
     )
 
-.. versionchanged:: 0.8.0b2,0.7.10
-    The ``for_update`` argument on :class:`.FetchedValue` is set automatically
-    when specified as the ``server_onupdate`` argument.  If using an older version,
-    specify the onupdate above as ``server_onupdate=FetchedValue(for_update=True)``.
-
 These markers do not emit a "default" clause when the table is created,
 however they do set the same internal flags as a static ``server_default``
 clause, providing hints to higher-level tools that a "post-fetch" of these
index d1ad7a68b961a8c83baaa0c129050b783b029260..577ed140f49e8c7eed5f62c0d85171bb7ea8b761 100644 (file)
@@ -370,6 +370,7 @@ and ``TypeB`` classes.
    attributes, including user-defined attributes as well as
    :func:`.association_proxy`.
 
+.. _decl_mixin_inheritance:
 
 Controlling table inheritance with mixins
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index b2e8b5afec8fa8112e90f8f3f41334c80e099558..d02db7aa539d3c6fa887696c51a01231eabd9c80 100644 (file)
@@ -42,6 +42,15 @@ def instrument_declarative(cls, registry, metadata):
 def has_inherited_table(cls):
     """Given a class, return True if any of the classes it inherits from has a
     mapped table, otherwise return False.
+
+    This is used in declarative mixins to build attributes that behave
+    differently for the base class vs. a subclass in an inheritance
+    hierarchy.
+
+    .. seealso::
+
+        :ref:`decl_mixin_inheritance`
+
     """
     for class_ in cls.__mro__[1:]:
         if getattr(class_, '__table__', None) is not None:
index 98a96fd56fb61f5595647755fdfbf39de104f371..fe98138ad446f3686260db665a44d3c7612764b7 100644 (file)
@@ -1061,6 +1061,10 @@ class Column(SchemaItem, ColumnClause):
             using :class:`.ColumnDefault` as a positional argument with
             ``for_update=True``.
 
+            .. seealso::
+
+                :ref:`metadata_defaults` - complete discussion of onupdate
+
         :param primary_key: If ``True``, marks this column as a primary key
             column. Multiple columns can have this flag set to specify
             composite primary keys. As an alternative, the primary key of a
@@ -1095,14 +1099,20 @@ class Column(SchemaItem, ColumnClause):
 
             .. seealso::
 
-                :ref:`server_defaults`
+                :ref:`server_defaults` - complete discussion of server side
+                defaults
 
         :param server_onupdate:   A :class:`.FetchedValue` instance
-             representing a database-side default generation function. This
+             representing a database-side default generation function,
+             such as a trigger. This
              indicates to SQLAlchemy that a newly generated value will be
-             available after updates. This construct does not specify any DDL
-             and the implementation is left to the database, such as via a
-             trigger.
+             available after updates. This construct does not actually
+             implement any kind of generation function within the database,
+             which instead must be specified separately.
+
+            .. seealso::
+
+                :ref:`triggered_columns`
 
         :param quote: Force quoting of this column's name on or off,
              corresponding to ``True`` or ``False``. When left at its default