[sqlalchemy] Re: PickleType too small
I have tried simple examples with PickleType and modified MyPickle (as suggested) and it works just fine. But, when I try it my segment of code, where I read row in a simple way and than put it in another structure, it didn't wanted to work (like unpickling wasn't working at all). So I did explicit pickling and unpickling of my data and everything works now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: PickleType too small
Now that I have succeeded to write in my Pickle type into a database I have another problem. When I read it from the database how do I convert it to my original data (since I get pickle-file-like data after reading a row)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: PickleType too small
I have tried adding max_allowed_packet=16M to my.ini under [mysqld] but it didn't work. As far as I have seen BLOB type is used when mapping PickleType to MySQL. I would like to use LONGBLOB, so I did: class MyPickle(PickleType): impl = mysql.MSLongBlob and Column('data',MyPickle()) in a table specification, but I got error message: AttributeError: 'module' object has no attribute 'MSLongBlob'. Any further suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: PickleType too small
there is no MSLongBlob at the moment. there is an MSMediumBlob which comes out as MEDIUMBLOB, mysql says they are 16 megs in size. or try doing this: class MSLongBlob(MSBinary): def get_col_spec(self): return LONGBLOB On Jan 21, 2007, at 5:03 PM, milena wrote: I have tried adding max_allowed_packet=16M to my.ini under [mysqld] but it didn't work. As far as I have seen BLOB type is used when mapping PickleType to MySQL. I would like to use LONGBLOB, so I did: class MyPickle(PickleType): impl = mysql.MSLongBlob and Column('data',MyPickle()) in a table specification, but I got error message: AttributeError: 'module' object has no attribute 'MSLongBlob'. Any further suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---