summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/proxy.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-02-25 07:12:50 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-02-25 07:12:50 +0000
commit72dd2b08beb9803269983aa220e75b44007e5158 (patch)
tree16f80b5f869ba68ae17e2fcbe9b18f1542b22e84 /lib/sqlalchemy/ext/proxy.py
parent5b81c1a2d0915d95d9928ffaaf81af814cf4ec3e (diff)
downloadsqlalchemy-72dd2b08beb9803269983aa220e75b44007e5158.tar.gz
merged sql_rearrangement branch , refactors sql package to work standalone with
clause elements including tables and columns, schema package deals with "physical" representations
Diffstat (limited to 'lib/sqlalchemy/ext/proxy.py')
-rw-r--r--lib/sqlalchemy/ext/proxy.py50
1 files changed, 1 insertions, 49 deletions
diff --git a/lib/sqlalchemy/ext/proxy.py b/lib/sqlalchemy/ext/proxy.py
index c1bdd9fa5..4f1f9e401 100644
--- a/lib/sqlalchemy/ext/proxy.py
+++ b/lib/sqlalchemy/ext/proxy.py
@@ -13,7 +13,7 @@ class ProxyEngine(object):
"""
SQLEngine proxy. Supports lazy and late initialization by
delegating to a real engine (set with connect()), and using proxy
- classes for TableImpl, ColumnImpl and TypeEngine.
+ classes for TypeEngine.
"""
def __init__(self):
@@ -61,15 +61,6 @@ class ProxyEngine(object):
return None
return self.get_engine().oid_column_name()
- def columnimpl(self, column):
- """Proxy point: return a ProxyColumnImpl
- """
- return ProxyColumnImpl(self, column)
-
- def tableimpl(self, table):
- """Proxy point: return a ProxyTableImpl
- """
- return ProxyTableImpl(self, table)
def type_descriptor(self, typeobj):
"""Proxy point: return a ProxyTypeEngine
@@ -84,45 +75,6 @@ class ProxyEngine(object):
raise AttributeError('No connection established in ProxyEngine: '
' no access to %s' % attr)
-
-class ProxyColumnImpl(sql.ColumnImpl):
- """Proxy column; defers engine access to ProxyEngine
- """
- def __init__(self, engine, column):
- sql.ColumnImpl.__init__(self, column)
- self._engine = engine
- self.impls = weakref.WeakKeyDictionary()
- def _get_impl(self):
- e = self._engine.engine
- try:
- return self.impls[e]
- except KeyError:
- impl = e.columnimpl(self.column)
- self.impls[e] = impl
- def __getattr__(self, key):
- return getattr(self._get_impl(), key)
- engine = property(lambda self: self._engine.engine)
-
-class ProxyTableImpl(sql.TableImpl):
- """Proxy table; defers engine access to ProxyEngine
- """
- def __init__(self, engine, table):
- sql.TableImpl.__init__(self, table)
- self._engine = engine
- self.impls = weakref.WeakKeyDictionary()
- def _get_impl(self):
- e = self._engine.engine
- try:
- return self.impls[e]
- except KeyError:
- impl = e.tableimpl(self.table)
- self.impls[e] = impl
- return impl
- def __getattr__(self, key):
- return getattr(self._get_impl(), key)
-
- engine = property(lambda self: self._engine.engine)
-
class ProxyType(object):
"""ProxyType base class; used by ProxyTypeEngine to construct proxying
types