Commit d9587ee8 authored by 's avatar

Checked in workaround for SQLAlias leaking until we can debug the problem.

parent 565e8f32
......@@ -85,8 +85,8 @@
__doc__='''Class for reading RDB files
$Id: RDB.py,v 1.26 2000/07/17 15:04:35 brian Exp $'''
__version__='$Revision: 1.26 $'[11:-2]
$Id: RDB.py,v 1.27 2000/12/19 15:23:48 brian Exp $'''
__version__='$Revision: 1.27 $'[11:-2]
import regex, regsub
from string import split, strip, lower, upper, atof, atoi, atol, find, join
......@@ -154,10 +154,20 @@ class DatabaseResults:
if schema.has_key(name):
raise ValueError, 'Duplicate column name, %s' % name
schema[name]=i
n=lower(name)
if n != name: aliases.append((n, SQLAlias(name)))
n=upper(name)
if n != name: aliases.append((n, SQLAlias(name)))
# XXX temporary fix: SQLAliases have a leak that needs to
# be addressed, then we can take this out.
#
# n=lower(name)
# if n != name: aliases.append((n, SQLAlias(name)))
# n=upper(name)
# if n != name: aliases.append((n, SQLAlias(name)))
schema[lower(name)]=i
schema(upper(name)]=i
# / temporary fix
i=i+1
self._nv=nv=len(names)
......@@ -211,10 +221,13 @@ class DatabaseResults:
for k in filter(lambda k: k[:2]=='__', Record.__dict__.keys()):
setattr(r,k,getattr(Record,k))
# XXX temporary fix: SQLAliases have a leak that needs to
# be addressed, then we can add this back.
#
# Add SQL Aliases
d=r.__dict__
for k, v in aliases:
if not hasattr(r,k): d[k]=v
# d=r.__dict__
# for k, v in aliases:
# if not hasattr(r,k): d[k]=v
if hasattr(brains, '__init__'):
binit=brains.__init__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment