Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 2 and Version 3 of SqlObjectGotchas


Ignore:
Timestamp:
09/11/06 13:58:00 (13 years ago)
Author:
nerkles
Comment:

added stuff about PickleCol? and length

Legend:

Unmodified
Added
Removed
Modified
  • SqlObjectGotchas

    v2 v3  
    1414 
    1515Question: Maybe this is a bug in SQLObject? 
     16 
     17= Using PickleCol and MySQL = 
     18 
     19{{{ 
     20    some_field = PickleCol() 
     21}}} 
     22 
     23Will create a TINYBLOB column in MySQL, which can only hold 256 bytes. Depending on the data you're throwing at it, this may be OK, but if you start getting "Pickle data truncated" errors, add a length to the PickleCol, like so: 
     24 
     25{{{ 
     26    some_field = PickleCol( length=2**24 ) 
     27}}} 
     28 
     29This will give you more room to pickle stuff.  
     30 
     31Check the MySQL docs to see what length values will map to MEDIUMBLOB and LARGEBLOB, if you need to be precise. 
     32