diff options
Diffstat (limited to 'lib/extensions.py')
-rw-r--r-- | lib/extensions.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/extensions.py b/lib/extensions.py index e9b6813..57aa9c6 100644 --- a/lib/extensions.py +++ b/lib/extensions.py @@ -132,10 +132,11 @@ class SQL_IN(object): for obj in pobjs: if hasattr(obj, 'prepare'): obj.prepare(self._conn) - qobjs = [str(o.getquoted()) for o in pobjs] - return '(' + ', '.join(qobjs) + ')' + qobjs = [o.getquoted() for o in pobjs] + return b('(') + b(', ').join(qobjs) + b(')') - __str__ = getquoted + def __str__(self): + return str(self.getquoted()) class NoneAdapter(object): @@ -147,8 +148,8 @@ class NoneAdapter(object): def __init__(self, obj): pass - def getquoted(self): - return "NULL" + def getquoted(self, _null=b("NULL")): + return _null # Add the "cleaned" version of the encodings to the key. |