]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
docs
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Feb 2014 01:10:52 +0000 (20:10 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Feb 2014 01:10:52 +0000 (20:10 -0500)
doc/build/builder/autodoc_mods.py
doc/build/core/constraints.rst
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/base.py

index 8e13d76afb67a844d38a55c964bc7f08c2a935c4..5a6e991bd57760fc50d0e750e9a242c472808d2a 100644 (file)
@@ -23,13 +23,14 @@ _convert_modname = {
 
 _convert_modname_w_class = {
     ("sqlalchemy.engine.interfaces", "Connectable"): "sqlalchemy.engine",
+    ("sqlalchemy.sql.base", "DialectKWArgs"): "sqlalchemy.sql.base",
 }
 
 def _adjust_rendered_mod_name(modname, objname):
-    if modname in _convert_modname:
-        return _convert_modname[modname]
-    elif (modname, objname) in _convert_modname_w_class:
+    if (modname, objname) in _convert_modname_w_class:
         return _convert_modname_w_class[(modname, objname)]
+    elif modname in _convert_modname:
+        return _convert_modname[modname]
     else:
         return modname
 
index 91f794de1ebcc97a20d6c4566b5d4f65405103d2..3979631b0980f7715324e9a8d0e6f5c6f5063c8f 100644 (file)
@@ -431,26 +431,33 @@ name as follows::
 Constraints API
 ---------------
 .. autoclass:: Constraint
-
+    :members:
 
 .. autoclass:: CheckConstraint
-
+    :members:
+    :inherited-members:
 
 .. autoclass:: ColumnCollectionConstraint
-
+    :members:
 
 .. autoclass:: ForeignKey
     :members:
+    :inherited-members:
 
 
 .. autoclass:: ForeignKeyConstraint
     :members:
+    :inherited-members:
 
 
 .. autoclass:: PrimaryKeyConstraint
+    :members:
+    :inherited-members:
 
 
 .. autoclass:: UniqueConstraint
+    :members:
+    :inherited-members:
 
 
 .. _schema_indexes:
@@ -569,3 +576,4 @@ Index API
 
 .. autoclass:: Index
     :members:
+    :inherited-members:
index ed975b8cf3aa31213d9f2c564bff318e8b4c2777..0fd41105cedf12a0596096817e3f0614908f4252 100644 (file)
@@ -115,8 +115,7 @@ class DefaultDialect(interfaces.Dialect):
     """Optional set of argument specifiers for various SQLAlchemy
     constructs, typically schema items.
 
-    To
-    implement, establish as a series of tuples, as in::
+    To implement, establish as a series of tuples, as in::
 
         construct_arguments = [
             (schema.Index, {
@@ -127,14 +126,25 @@ class DefaultDialect(interfaces.Dialect):
         ]
 
     If the above construct is established on the Postgresql dialect,
-    the ``Index`` construct will now accept additional keyword arguments
-    such as ``postgresql_using``, ``postgresql_where``, etc.  Any kind of
-    ``postgresql_XYZ`` argument not corresponding to the above template will
-    be rejected with an ``ArgumentError`, for all those SQLAlchemy constructs
-    which implement the :class:`.DialectKWArgs` class.
-
-    The default is ``None``; older dialects which don't implement the argument
-    will have the old behavior of un-validated kwargs to schema/SQL constructs.
+    the :class:`.Index` construct will now accept the keyword arguments
+    ``postgresql_using``, ``postgresql_where``, nad ``postgresql_ops``.
+    Any other argument specified to the constructor of :class:`.Index`
+    which is prefixed with ``postgresql_`` will raise :class:`.ArgumentError`.
+
+    A dialect which does not include a ``construct_arguments`` member will
+    not participate in the argument validation system.  For such a dialect,
+    any argument name is accepted by all participating constructs, within
+    the namespace of arguments prefixed with that dialect name.  The rationale
+    here is so that third-party dialects that haven't yet implemented this
+    feature continue to function in the old way.
+
+    .. versionadded:: 0.9.2
+
+    .. seealso::
+
+        :class:`.DialectKWArgs` - implementing base class which consumes
+        :attr:`.DefaultDialect.construct_arguments`
+
 
     """
 
index 26007b5986005022e633e49a2a18fde23c4088ee..818a07deb86b073e785fb121231126d97034d151 100644 (file)
@@ -138,7 +138,14 @@ class _DialectArgDict(_DialectArgDictBase):
 
 class DialectKWArgs(object):
     """Establish the ability for a class to have dialect-specific arguments
-    with defaults and validation.
+    with defaults and constructor validation.
+
+    The :class:`.DialectKWArgs` interacts with the
+    :attr:`.DefaultDialect.construct_arguments` present on a dialect.
+
+    .. seealso::
+
+        :attr:`.DefaultDialect.construct_arguments`
 
     """
 
@@ -153,7 +160,7 @@ class DialectKWArgs(object):
             some_index = Index('a', 'b', mydialect_length=5)
 
         The :meth:`.DialectKWArgs.argument_for` method is a per-argument
-        way adding extra arguments to the :attr:`.Dialect.construct_arguments`
+        way adding extra arguments to the :attr:`.DefaultDialect.construct_arguments`
         dictionary. This dictionary provides a list of argument names accepted by
         various schema-level constructs on behalf of a dialect.
 
@@ -164,7 +171,7 @@ class DialectKWArgs(object):
 
         :param dialect_name: name of a dialect.  The dialect must be locatable,
          else a :class:`.NoSuchModuleError` is raised.   The dialect must
-         also include an existing :attr:`.Dialect.construct_arguments` collection,
+         also include an existing :attr:`.DefaultDialect.construct_arguments` collection,
          indicating that it participates in the keyword-argument validation and
          default system, else :class:`.ArgumentError` is raised.
          If the dialect does not include this collection, then any keyword argument