[Dbix-class] Enumerated type

Josef Karthauser joe at tao.org.uk
Tue Nov 7 18:18:18 GMT 2006


On Tue, Nov 07, 2006 at 09:21:12AM +0000, Jess Robinson wrote:
> 
> Not currently, but if you do add them, I suggest you use the format that 
> SQL::Translator supports, in the column_info, so that deploy() just works.
> 
> -> add_columns( 'enumfieldname' => {
>      data_type => 'enum',
>      extra => { 'list' => ['red', 'green', 'blue'] }
>    });
> 
> - Currently this is mysql-only, and if you're lucky, the other producers 
> will convert mysql enum types to normal fields with constraints..
> 
> NB You can also set: 'binary', 'unsigned', 'zerofill', 'character set', 
> 'collate', 'on update' in the extras data for mysql.
> 

Are you suggesting I just hard code the values into my class files
using this syntax for now, and wait for the API to catch up?

Joe
-- 
Josef Karthauser (joe at tao.org.uk)	       http://www.josef-k.net/
Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
================ An eclectic mix of fact and theory. =================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://jules.scsys.co.uk/pipermail/dbix-class/attachments/20061107/8d0b6c64/attachment.pgp


More information about the Dbix-class mailing list