Użytkownik John napisał:
> Paul, Larry was able to get Dabo to accept the binary data. However, we
> followed the idea that each DB adapter had a "fixBinaryData()" method that
> made the correct conversion to allow Dabo to save/update/insert. Other code
> changes were done too. But my point is I still think in the end having a
> backend method is going to be a requirment.
>
> For example in the case of Postgres
>
> def fixBinaryData(self, val):
> return psycopg2.Binary(val)
>
Hi,
I tried to solve problem my own way.
I tried to encapsulate binary data in dNoEscQuoteStr object, although
noticed two problems:
- first, we need to modify dNoEscQuoteStr class to accept buffer type
object, e.g.:
def __str__(self):
if not isinstance(self._value, str):
ret = array.array("c", self._value).tostring()
else:
ret = self._value
return ret
- second, we need to correct sql expression formatting in
dCursorMixin.__saverow() method
to avoid UnicodeDecodeError exception.
--
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]