diff options
| author | Jason Kirtland <jek@discorporate.us> | 2008-12-11 22:09:12 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2008-12-11 22:09:12 +0000 |
| commit | 8d3fab1250fdb9e5cf389fcfa6a8c5f7f0ebbded (patch) | |
| tree | 6504f1ebba8f31bd69478c52b1facbc35dc457eb /lib/sqlalchemy | |
| parent | f334da1f6b7cbe34567776abf67fab86580fadf2 (diff) | |
| download | sqlalchemy-8d3fab1250fdb9e5cf389fcfa6a8c5f7f0ebbded.tar.gz | |
Index entries for thread safety.
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 11 | ||||
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 5 | ||||
| -rw-r--r-- | lib/sqlalchemy/schema.py | 13 |
3 files changed, 22 insertions, 7 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index df9cfa729..fc7fd9056 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -507,8 +507,11 @@ class Connection(Connectable): as ClauseElement, Compiled and DefaultGenerator objects. Provides a begin method to return Transaction objects. - The Connection object is **not** threadsafe. - + The Connection object is **not** thread-safe. + + .. index:: + single: thread safety; Connection + """ def __init__(self, engine, connection=None, close_with_result=False, @@ -984,6 +987,10 @@ class Transaction(object): """Represent a Transaction in progress. The Transaction object is **not** threadsafe. + + .. index:: + single: thread safety; Transaction + """ def __init__(self, connection, parent): diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 86ce3de94..eb003fda2 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -214,7 +214,10 @@ class SessionTransaction(object): Direct usage of ``SessionTransaction`` is not necessary as of SQLAlchemy 0.4; use the ``begin()`` and ``commit()`` methods on ``Session`` itself. - The ``SessionTransaction`` object is **not** threadsafe. + The ``SessionTransaction`` object is **not** thread-safe. + + .. index:: + single: thread safety; SessionTransaction """ diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index c96d8adf4..da534a2fa 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -1443,12 +1443,13 @@ class MetaData(SchemaItem): """A collection of Tables and their associated schema constructs. Holds a collection of Tables and an optional binding to an ``Engine`` or - ``Connection``. If bound, the :class:`~sqlalchemy.schema.Table` objects in the - collection and their columns may participate in implicit SQL execution. + ``Connection``. If bound, the :class:`~sqlalchemy.schema.Table` objects + in the collection and their columns may participate in implicit SQL + execution. - The `Table` objects themselves are stored in the `metadata.tables` + The `Table` objects themselves are stored in the `metadata.tables` dictionary. - + The ``bind`` property may be assigned to dynamically. A common pattern is to start unbound and then bind later when an engine is available:: @@ -1461,6 +1462,10 @@ class MetaData(SchemaItem): MetaData is a thread-safe object after tables have been explicitly defined or loaded via reflection. + + .. index:: + single: thread safety; MetaData + """ __visit_name__ = 'metadata' |
