you can do this:

table = Table('mytable', metadata,
        Column('blob_col', PickleType),
        autoload=True
)

which will autoload everything except for the one column you care about overriding.

On May 27, 2006, at 8:52 AM, Robin Bryce wrote:

Hi,

I have a BLOB column in a mysql table. If I reflect this table sqlalchemy uses sqlalchemy.databases.mysql.MSBinary. All well and good, except I'd like some way of coercing it to sqlalchemy.types.PickleType. The model I was hoping to use was:

- offline tool specifies / manages the schema.
- runtime app *always* reflects and doesn't pull in the table definitions in any other way.

Because I don't necessarily want to manage the full schema description in sqlalchemy.

If I do this, and because the sqlalchemy bits of the schema are using PickleType for BLOB columns in the offline tool, I fall victim of "TypeError: array item must be char" when I bind parameters for the BLOB collumns in the runtime. Reflection, of course, can't infer BLOB means PickleType without some hint from me. Is there a clean way to pass such a hint in ?

Simply pulling the table definitions into the run time and *not* reflecting works find but this is a little disatisfactory.

Cheers,
Robin



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to