[Dbix-class] tinyint and enum mapping

Fayland Lam fayland at gmail.com
Fri Oct 24 14:11:46 BST 2008


hi, folks.

basically I prefers tinyint better than enum becaue I don't need alter
table when adding another value to col.

see now we have a column 'status' and it's tinyint instead of enum
then I want my code treats it as enum instead of tinyint. it means I
can do something like follows:

->create( { status => 'banned' } );
->update( { status => 'warned' } );
and ->delete and others.

I think InflateColumn is what I want. but I just wonder if there is a
plugin for that? so that I can just add it into load_components and
set an attribute when add_columns.
is there a component around? or should I write one? :)

Thanks.
-- 
Fayland Lam // http://www.fayland.org/
Foorum based on Catalyst // http://www.foorumbbs.com/



More information about the DBIx-Class mailing list