[SQL-CVS] r176 - in trunk/SQLObject: docs sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-08-18 23:55:58
|
Author: ianb Date: 2004-08-17 16:41:39 -0400 (Tue, 17 Aug 2004) New Revision: 176 Modified: trunk/SQLObject/docs/News.txt trunk/SQLObject/sqlobject/converters.py Log: Convert long ints properly=20 Modified: trunk/SQLObject/docs/News.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/docs/News.txt 2004-08-17 20:35:43 UTC (rev 175) +++ trunk/SQLObject/docs/News.txt 2004-08-17 20:41:39 UTC (rev 176) @@ -48,6 +48,9 @@ DBMS, not in SQLObject (i.e., they will not work in databases like MySQL and SQLite). =20 +* New ``_create(id, **kw)`` method that can be overridden to intercept + and modify attempts to insert rows in the database. + Bugs ---- =20 @@ -61,6 +64,7 @@ =20 * Python 2.2 booleans fixed (SF: 903488) =20 +* Longs (e.g., ``1L``) get converted properly (SF: 939965) =20 SQLObject 0.5.2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Modified: trunk/SQLObject/sqlobject/converters.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/sqlobject/converters.py 2004-08-17 20:35:43 UTC (rev = 175) +++ trunk/SQLObject/sqlobject/converters.py 2004-08-17 20:41:39 UTC (rev = 176) @@ -105,8 +105,12 @@ return repr(int(value)) =20 registerConverter(type(1), IntConverter) -registerConverter(type(0L), IntConverter) =20 +def LongConverter(value, db): + return str(value) + +registerConverter(type(0L), LongConverter) + if NumericType: registerConverter(NumericType, IntConverter) =20 |