diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-12-06 19:14:39 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-12-06 19:14:39 -0500 |
| commit | 8f55656186cc5e38e3f5bb4d1bbca1f3899954d2 (patch) | |
| tree | 11f16ccc820b4117d312bf57d4739f26cd123cd3 /lib/sqlalchemy | |
| parent | af1a545bdd9d5210981a07f74e62f5d343b14537 (diff) | |
| parent | 54f45deb9744863da7dbb276e5204d37a7993927 (diff) | |
| download | sqlalchemy-8f55656186cc5e38e3f5bb4d1bbca1f3899954d2.tar.gz | |
merge dance
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 14 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/reflection.py | 16 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/result.py | 10 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/compiler.py | 11 | ||||
| -rw-r--r-- | lib/sqlalchemy/schema.py | 23 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 4 |
6 files changed, 39 insertions, 39 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 626fee8c6..e3b09e63a 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -121,7 +121,7 @@ class Connection(Connectable): Note that any key/value can be passed to :meth:`.Connection.execution_options`, and it will be stored in the - ``_execution_options`` dictionary of the :class:`.Connnection`. It + ``_execution_options`` dictionary of the :class:`.Connection`. It is suitable for usage by end-user schemes to communicate with event listeners, for example. @@ -1295,8 +1295,8 @@ class TwoPhaseTransaction(Transaction): class Engine(Connectable, log.Identified): """ Connects a :class:`~sqlalchemy.pool.Pool` and - :class:`~sqlalchemy.engine.base.Dialect` together to provide a source - of database connectivity and behavior. + :class:`~sqlalchemy.engine.interfaces.Dialect` together to provide a + source of database connectivity and behavior. An :class:`.Engine` object is instantiated publicly using the :func:`~sqlalchemy.create_engine` function. @@ -1426,15 +1426,15 @@ class Engine(Connectable, log.Identified): @property def name(self): - """String name of the :class:`~sqlalchemy.engine.Dialect` in use by - this ``Engine``.""" + """String name of the :class:`~sqlalchemy.engine.interfaces.Dialect` + in use by this :class:`Engine`.""" return self.dialect.name @property def driver(self): - """Driver name of the :class:`~sqlalchemy.engine.Dialect` in use by - this ``Engine``.""" + """Driver name of the :class:`~sqlalchemy.engine.interfaces.Dialect` + in use by this :class:`Engine`.""" return self.dialect.driver diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 8367d8761..f1681d616 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -55,7 +55,7 @@ class Inspector(object): """Performs database schema inspection. The Inspector acts as a proxy to the reflection methods of the - :class:`~sqlalchemy.engine.base.Dialect`, providing a + :class:`~sqlalchemy.engine.interfaces.Dialect`, providing a consistent interface as well as caching support for previously fetched metadata. @@ -72,7 +72,7 @@ class Inspector(object): engine = create_engine('...') insp = Inspector.from_engine(engine) - Where above, the :class:`~sqlalchemy.engine.base.Dialect` may opt + Where above, the :class:`~sqlalchemy.engine.interfaces.Dialect` may opt to return an :class:`.Inspector` subclass that provides additional methods specific to the dialect's target database. @@ -81,13 +81,13 @@ class Inspector(object): def __init__(self, bind): """Initialize a new :class:`.Inspector`. - :param bind: a :class:`~sqlalchemy.engine.base.Connectable`, + :param bind: a :class:`~sqlalchemy.engine.Connectable`, which is typically an instance of :class:`~sqlalchemy.engine.Engine` or :class:`~sqlalchemy.engine.Connection`. For a dialect-specific instance of :class:`.Inspector`, see - :meth:`Inspector.from_engine` + :meth:`.Inspector.from_engine` """ # this might not be a connection, it could be an engine. @@ -111,16 +111,16 @@ class Inspector(object): """Construct a new dialect-specific Inspector object from the given engine or connection. - :param bind: a :class:`~sqlalchemy.engine.base.Connectable`, + :param bind: a :class:`~sqlalchemy.engine.Connectable`, which is typically an instance of :class:`~sqlalchemy.engine.Engine` or :class:`~sqlalchemy.engine.Connection`. This method differs from direct a direct constructor call of :class:`.Inspector` in that the - :class:`~sqlalchemy.engine.base.Dialect` is given a chance to provide - a dialect-specific :class:`.Inspector` instance, which may provide - additional methods. + :class:`~sqlalchemy.engine.interfaces.Dialect` is given a chance to + provide a dialect-specific :class:`.Inspector` instance, which may + provide additional methods. See the example at :class:`.Inspector`. diff --git a/lib/sqlalchemy/engine/result.py b/lib/sqlalchemy/engine/result.py index 98b0ea4b2..dcfd5ac31 100644 --- a/lib/sqlalchemy/engine/result.py +++ b/lib/sqlalchemy/engine/result.py @@ -557,7 +557,7 @@ class ResultProxy(object): supports "returning" and the insert statement executed with the "implicit returning" enabled. - Raises :class:`.InvalidRequestError` if the executed + Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed statement is not a compiled expression construct or is not an insert() construct. @@ -583,7 +583,7 @@ class ResultProxy(object): """Return the collection of updated parameters from this execution. - Raises :class:`.InvalidRequestError` if the executed + Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed statement is not a compiled expression construct or is not an update() construct. @@ -605,7 +605,7 @@ class ResultProxy(object): """Return the collection of inserted parameters from this execution. - Raises :class:`.InvalidRequestError` if the executed + Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed statement is not a compiled expression construct or is not an insert() construct. @@ -639,7 +639,7 @@ class ResultProxy(object): See :class:`.ExecutionContext` for details. - Raises :class:`.InvalidRequestError` if the executed + Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed statement is not a compiled expression construct or is not an insert() or update() construct. @@ -661,7 +661,7 @@ class ResultProxy(object): See :class:`.ExecutionContext` for details. - Raises :class:`.InvalidRequestError` if the executed + Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed statement is not a compiled expression construct or is not an insert() or update() construct. diff --git a/lib/sqlalchemy/ext/compiler.py b/lib/sqlalchemy/ext/compiler.py index 93984d0d1..25de2c0b6 100644 --- a/lib/sqlalchemy/ext/compiler.py +++ b/lib/sqlalchemy/ext/compiler.py @@ -65,11 +65,12 @@ dialect is used. Compiling sub-elements of a custom expression construct ======================================================= -The ``compiler`` argument is the :class:`~sqlalchemy.engine.base.Compiled` -object in use. This object can be inspected for any information about the -in-progress compilation, including ``compiler.dialect``, -``compiler.statement`` etc. The :class:`~sqlalchemy.sql.compiler.SQLCompiler` -and :class:`~sqlalchemy.sql.compiler.DDLCompiler` both include a ``process()`` +The ``compiler`` argument is the +:class:`~sqlalchemy.engine.interfaces.Compiled` object in use. This object +can be inspected for any information about the in-progress compilation, +including ``compiler.dialect``, ``compiler.statement`` etc. The +:class:`~sqlalchemy.sql.compiler.SQLCompiler` and +:class:`~sqlalchemy.sql.compiler.DDLCompiler` both include a ``process()`` method which can be used for compilation of embedded attributes:: from sqlalchemy.sql.expression import Executable, ClauseElement diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index f6a6b83b4..2fb542a43 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -146,7 +146,7 @@ class Table(SchemaItem, expression.TableClause): table. The metadata is used as a point of association of this table with other tables which are referenced via foreign key. It also may be used to associate this table with a particular - :class:`~sqlalchemy.engine.base.Connectable`. + :class:`.Connectable`. :param \*args: Additional positional arguments are used primarily to add the list of :class:`.Column` objects contained within this @@ -240,7 +240,7 @@ class Table(SchemaItem, expression.TableClause): This alternate hook to :func:`.event.listen` allows the establishment of a listener function specific to this :class:`.Table` before the "autoload" process begins. Particularly useful for - the :meth:`.events.column_reflect` event:: + the :meth:`.DDLEvents.column_reflect` event:: def listen_for_reflect(table, column_info): "handle the column reflection event" @@ -254,7 +254,7 @@ class Table(SchemaItem, expression.TableClause): ]) :param mustexist: When ``True``, indicates that this Table must already - be present in the given :class:`.MetaData`` collection, else + be present in the given :class:`.MetaData` collection, else an exception is raised. :param prefixes: @@ -2600,9 +2600,8 @@ class MetaData(SchemaItem): in this ``MetaData`` no longer exists in the database. :param bind: - A :class:`~sqlalchemy.engine.base.Connectable` used to access the - database; if None, uses the existing bind on this ``MetaData``, if - any. + A :class:`.Connectable` used to access the database; if None, uses + the existing bind on this ``MetaData``, if any. :param schema: Optional, query and reflect tables from an alterate schema. @@ -2689,7 +2688,7 @@ class MetaData(SchemaItem): present in the target database. :param bind: - A :class:`~sqlalchemy.engine.base.Connectable` used to access the + A :class:`.Connectable` used to access the database; if None, uses the existing bind on this ``MetaData``, if any. @@ -2716,7 +2715,7 @@ class MetaData(SchemaItem): the target database. :param bind: - A :class:`~sqlalchemy.engine.base.Connectable` used to access the + A :class:`.Connectable` used to access the database; if None, uses the existing bind on this ``MetaData``, if any. @@ -2858,14 +2857,14 @@ class DDLElement(expression.Executable, _DDLCompiles): """Execute this DDL immediately. Executes the DDL statement in isolation using the supplied - :class:`~sqlalchemy.engine.base.Connectable` or - :class:`~sqlalchemy.engine.base.Connectable` assigned to the ``.bind`` + :class:`.Connectable` or + :class:`.Connectable` assigned to the ``.bind`` property, if not supplied. If the DDL has a conditional ``on`` criteria, it will be invoked with None as the event. :param bind: Optional, an ``Engine`` or ``Connection``. If not supplied, a valid - :class:`~sqlalchemy.engine.base.Connectable` must be present in the + :class:`.Connectable` must be present in the ``.bind`` property. :param target: @@ -3146,7 +3145,7 @@ class DDL(DDLElement): available for use in string substitutions on the DDL statement. :param bind: - Optional. A :class:`~sqlalchemy.engine.base.Connectable`, used by + Optional. A :class:`.Connectable`, used by default when ``execute()`` is invoked without a bind argument. diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index aa912a0f6..fa59683f2 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -1866,10 +1866,10 @@ class ClauseElement(Visitable): def compile(self, bind=None, dialect=None, **kw): """Compile this SQL expression. - The return value is a :class:`~sqlalchemy.engine.Compiled` object. + The return value is a :class:`~.Compiled` object. Calling ``str()`` or ``unicode()`` on the returned value will yield a string representation of the result. The - :class:`~sqlalchemy.engine.Compiled` object also can return a + :class:`~.Compiled` object also can return a dictionary of bind parameter names and values using the ``params`` accessor. |
