Hi all, with the pyPgSQL some values are not returned as basic Python types. For Postgres 'bigint' I get a PgInt8 type.
The problem: with these types, some type comparisons (created by PythonGenerator.py) and some assert statements fail because type(PgInt8Type)!=type(0L). Looking around, I found no way to tell the DB-API 2.0 compliant PyPgSQL to return only native types. These are two possible solutions: 1. The assert statements and type(value) comparison should check for not only one type, but a compatible type family. In my PostgresStorage I would override it and place the compatible types into the lists. (IntTypes, LongTypes, FloatTypes,DateTimeTypes, ObjRefTypes). The checks have to be changed in desing/PythonGenerator.py. 2. After retrieving rows from the database, all values are converted. So I need a function to convert values (file SQLObjectStore.py, function fetchObjectsOfClass) insert a hook (convertValues) after fetchall() but before further processing. Any other suggestions? Could Chuck as MiddleKit chief give his opinion on this? Thanx, Erny _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
