You are not logged in Log in Join
You are here: Home » Members » Andy Dustman's Zope Stuff » Tips » ZMySQLDA 2.0.x returns INTEGER columns as Python long integers » tip_view

Log in
Name

Password

 

Created by ZopeOrgSite . Last modified 2001-06-12 15:35:04.

ZMySQLDA-2.0.6 and earlier returns MySQL INTEGER columns as Python long integers, to avoid overflows on INTEGER UNSIGNED columns. Python 1.5.2 adds an L to long integers when converting to a string. To avoid the L, use a format string, i.e.
<var long_integer fmt="%d">
; or use Python 2.0 or later, which does not add the L.

Zope 2.4 will use Python 2.1 and thus will not add the L. ZMySQLDA-2.0.7 tries to return INTEGER columns as Python integers when possible; if the value is too large, it will return it as a Python long instead. This may still result in the occasional L on Zope < 2.4.