Oleg Broytmann wrote:

(Reply to the list, please)

On Wed, Apr 05, 2006 at 09:54:53AM +0200, sophana wrote:
in my previous mail, you can see that the whole colData elements are array instead of strings.

/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/mysql/mysqlconnection.py(130)columnsFromSchema()
-> colClass, kw = self.guessClass(t)
(Pdb) l
125                                     % tableName)
126             results = []
127             for field, t, nullAllowed, key, default, extra in colData:

(Pdb) print colData
((array('c', 'id'), array('c', 'int(11) unsigned'), array('c'), array('c', 'PRI'), None, array('c', 'auto_increment')), (array('c', 'UserName'), array('c', 'varchar(64)'), array('c'), array('c', 'MUL'), array('c'), array('c')), (array('c', 'Attribute'), array('c', 'varchar(32)'), array('c'), array('c'), array('c'), array('c')), (array('c', 'op'), array('c', 'char(2)'), array('c'), array('c'), array('c', '=='), array('c')), (array('c', 'Value'), array('c', 'varchar(253)'), array('c'), array('c'), array('c'), array('c')))

  A big tuple of arrays. "for" loop will assign an array for its every
varaible including 't'. Right?

Oleg.
briefly looking at the code, it seems that all these arrays should have been strings. colData comes from a self.queryAll call which is handled in the dbconnection.py.
      colData = self.queryAll("SHOW COLUMNS FROM %s"
                               % tableName)
itself call cursor.fetchall() to get all these arrays.
As I don't know what it is, I didn't go farther.

Note: my other sqlobjects without fromDatabase=true work fine.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to