diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-02-25 20:10:52 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-02-25 20:10:52 -0500 |
commit | f9492ef90641c2fa55bcd1ecc93ddcef7f82f08d (patch) | |
tree | beff152a4e348a5842ee973d0080af48062df3d4 /lib/sqlalchemy/engine/default.py | |
parent | 33f07202ce2d9d34f346e9629dc602d920091cf1 (diff) | |
download | sqlalchemy-f9492ef90641c2fa55bcd1ecc93ddcef7f82f08d.tar.gz |
docs
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
-rw-r--r-- | lib/sqlalchemy/engine/default.py | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index ed975b8cf..0fd41105c 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -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` + """ |