[Zope] ZMysqlDA error, and a workaround

Steve Spicklemire steve@spvi.com
Mon, 9 Oct 2000 17:59:58 -0500 (EST)


I'm guessing it's in db.py in ZMySQLDA, I had to do the same
thing with DECMIAL as shown here, I didn't post that since I'm
not sure most folks would want this behavior.... but you should 
be able to do the same with MEDIUMINT:

class DB:

    defs={
        FIELD_TYPE.CHAR: "i", FIELD_TYPE.DATE: "d",
        FIELD_TYPE.DATETIME: "d", FIELD_TYPE.DECIMAL: "n",
        FIELD_TYPE.DOUBLE: "n", FIELD_TYPE.FLOAT: "n", FIELD_TYPE.INT24: "i",
        FIELD_TYPE.LONG: "i", FIELD_TYPE.LONGLONG: "l",
        FIELD_TYPE.SHORT: "i", FIELD_TYPE.TIMESTAMP: "d",
        FIELD_TYPE.TINY: "i", FIELD_TYPE.YEAR: "i",
        }

    conv={
        FIELD_TYPE.TINY: int,
        FIELD_TYPE.SHORT: int,
        FIELD_TYPE.LONG: int,
        FIELD_TYPE.FLOAT: float,
        FIELD_TYPE.DOUBLE: float,
        FIELD_TYPE.LONGLONG: long,
        FIELD_TYPE.INT24: int,
        FIELD_TYPE.DECIMAL: float,
        FIELD_TYPE.YEAR: int
        }


-steve

>>>>> "Jon" == Jon Franz <jfranz@one.net> writes:

    Jon> This is additional info for the error mentioned in my last
    Jon> email.  If I alter the column definitions to use 'int' as
    Jon> opposed to 'mediumint', then everything works fine!  So, its
    Jon> the 'mediumint' type that isnt mapping properly...  where
    Jon> would i fix this?

    Jon> _______________________________________________ Zope maillist
    Jon> - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope
    Jon> ** No cross posts or HTML encoding!  ** (Related lists -
    Jon> http://lists.zope.org/mailman/listinfo/zope-announce
    Jon> http://lists.zope.org/mailman/listinfo/zope-dev )