[SQL-CVS] r1612 - in SQLObject/trunk/sqlobject: . tests
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2006-02-20 15:21:48
|
Author: phd
Date: 2006-02-20 08:21:39 -0700 (Mon, 20 Feb 2006)
New Revision: 1612
Modified:
SQLObject/trunk/sqlobject/col.py
SQLObject/trunk/sqlobject/tests/test_foreignKey.py
Log:
Applied the patch 1432091: handling array.array TEXT from MySQL results.
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2006-02-19 04:13:55 UTC (rev 1611)
+++ SQLObject/trunk/sqlobject/col.py 2006-02-20 15:21:39 UTC (rev 1612)
@@ -538,6 +538,8 @@
return None
if isinstance(value, unicode):
return value
+ if isinstance(value, array_type): # MySQL
+ return unicode(value.tostring(), self.db_encoding)
return unicode(value, self.db_encoding)
def from_python(self, value, state):
Modified: SQLObject/trunk/sqlobject/tests/test_foreignKey.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_foreignKey.py 2006-02-19 04:13:55 UTC (rev 1611)
+++ SQLObject/trunk/sqlobject/tests/test_foreignKey.py 2006-02-20 15:21:39 UTC (rev 1612)
@@ -39,7 +39,7 @@
assert s[0]==w2
def test2():
- TestWorkKey ._connection = getConnection()
+ TestWorkKey._connection = getConnection()
InstalledTestDatabase.drop(TestWorkKey)
setupClass([TestComposerKey, TestWorkKey2], force=True)
TestWorkKey2.sqlmeta.addColumn(ForeignKey('TestComposerKey'), changeSchema=True)
|