From: Martin B. <mar...@gm...> - 2005-01-13 04:53:53
|
hi some more tinkering. i want to store lists of stuff. i would use a table for the stuff itself, but i still need to store a variable-length list of indexes to those objects. seems to me like a typical problem, but i have little direct experience with SQL... how does one normally store variable-length lists of indexes or "stuff" with SQL? i saw that Postgres supports an array type, but there doesn't seem to be support for arrays in sqlobject. anyway, so after the binary type support i thought it would be cool to have a PickledCol column type, where pickling and unpickling would occur automatically. i fiddled with this for a short time and came up with the patch below (over 537). i'm not quite sure why toPython gets called multiple times with different types, i didn't take the time to debug the issue yet, but this seems to work. it's fun, you can store anything in the column. cheers, |