]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Removed DefaultDialect.ischema and information_schema's ISchema (which incidentally...
authorJason Kirtland <jek@discorporate.us>
Fri, 7 Sep 2007 23:13:16 +0000 (23:13 +0000)
committerJason Kirtland <jek@discorporate.us>
Fri, 7 Sep 2007 23:13:16 +0000 (23:13 +0000)
lib/sqlalchemy/databases/information_schema.py
lib/sqlalchemy/engine/default.py

index 48f33cb963a6a979705f3c4caa8a1a1bd0a9c105..1b3b3838abf0cb74ef024db7d11edf8f27106843 100644 (file)
@@ -76,26 +76,6 @@ ref_constraints = Table("referential_constraints", ischema,
     Column("update_rule", String),
     Column("delete_rule", String),
     schema="information_schema")
-                                   
-class ISchema(object):
-    def __init__(self, engine):
-        self.engine = engine
-        self.cache = {}
-
-    def __getattr__(self, name):
-        if name not in self.cache:
-            # This is a bit of a hack.
-            # It would probably be better to have a dict
-            # with just the information_schema tables at
-            # the module level, so as to avoid returning
-            # unrelated objects that happen to be named
-            # 'gen_*'
-            try:
-                gen_tbl = globals()['gen_'+name]
-            except KeyError:
-                raise exceptions.ArgumentError('information_schema table %s not found' % name)
-            self.cache[name] = gen_tbl.toengine(self.engine)
-        return self.cache[name]
 
 
 def table_names(connection, schema):
index 07f07d0be6b0a51e086a294760402dbdcb1312cf..9732b9e594b87c96c81e6a4421269b772a414d25 100644 (file)
@@ -118,13 +118,6 @@ class DefaultDialect(base.Dialect):
 
     def is_disconnect(self, e):
         return False
-        
-    def _get_ischema(self):
-        if self._ischema is None:
-            import sqlalchemy.databases.information_schema as ischema
-            self._ischema = ischema.ISchema(self)
-        return self._ischema
-    ischema = property(_get_ischema, doc="""returns an ISchema object for this engine, which allows access to information_schema tables (if supported)""")
 
 
 class DefaultExecutionContext(base.ExecutionContext):