On Tue, 7 Nov 2006, Josef Karthauser wrote:

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?


That already is the API, for when you want to use deploy() to create your tables from your schema, so if we end up supporting automatic retrieving of enum values, that's probably where you'll be able to find them.

(So I guess that means "yes" ;)

Jess


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to