Użytkownik Ed Leafe napisał:
>> I suggest you make another test:
>> a = "ab"
>> b = u"ab"
>> a == b
>> type(a) == type(b)
>>
>> Do you still think that "a" and "b" are the same?
>>
> No, of course not. Is this where you are seeing issues? Earlier you
> said it was a problem with float and Decimal values.
>
> In the future, it would be much more helpful if you explain exactly
> what the issue is instead of making unspecific charges that the framework is
> "completely wrong". Obviously, it has been used by many for years without a
> problem, so if there is an issue, please give us specific information about
> the problem so that we can possibly correct it.
>
Maybe reason is my poor English knowledge,
that I can't explain my problem clearly.
Here is my configuration:
Platform: Windows XP SP3
Python Version: 2.5.4 on win32
Dabo Version: Version 0.9.2; Revision ~5612
UI Version: 2.8.10.1 on wxMSW
Backend: PostgreSQL 8.3
I will try to explain issue I noticed best I can:
- assume we have table with double precision fields,
which are converted to float type in Python
and then, should be converted to Decimal type by Dabo;
- problem isn't visible for other data types because
dCursorMixin._correctFieldType() method is always executed,
but conversion has take in place only for _newQuery = True;
you probably can't see issue because backend returns data
mostly in correct format and string data is converted to
unicode regardless of _newQuery is True or False - unconditionally;
- now, with first bizobj requery, cursor execute() method
is called with _newQuery = True;
- because SQL code doesn't change, second requery
is called with _newQuery = False and no type conversion,
except string types which are proceed always.
I suggest you put breakpoint in line #385 of dCursorMixin code
and check _records variable each time.
General question is, why type conversion is conditional?
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]