diff options
author | Sylvain <syt@logilab.fr> | 2007-12-07 12:50:04 +0100 |
---|---|---|
committer | Sylvain <syt@logilab.fr> | 2007-12-07 12:50:04 +0100 |
commit | 8f1399c093af0d1f90e445445966922b1c9f1568 (patch) | |
tree | 317e8dfff07507954106686e5a47c8464c296344 /db.py | |
parent | f16558e76482a5f68680d13d86a23c1000fa59cd (diff) | |
download | logilab-common-8f1399c093af0d1f90e445445966922b1c9f1568.tar.gz |
may return an array instance
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -442,6 +442,8 @@ class _MySqlDBAdapter(DBAPIAdapter): # hack to differentiate mediumtext (String) and tinyblob/longblog # (Password/Bytes) which are all sharing the same type code :( if typecode == self.BINARY: + if hasattr(value, 'tostring'): # may be an array + value = value.tostring() maxsize = description[3] if maxsize == 16777215: # mediumtext (2**24 - 1) if isinstance(value, str): |