[Dbix-class] How to grep field types?
Matt S Trout
dbix-class at trout.me.uk
Fri May 11 10:51:57 GMT 2007
On Fri, May 11, 2007 at 10:42:56AM +0100, RA Jones wrote:
> Using formbuilder object in the controller and InflateColumns::DateTime
> in the model, it should be possible to retrieve field definitions like:
>
> my $form = $self->formbuilder; # CCF object
> my @date_fields = grep { $_->get_field_types } keys %{ $form->field };
>
> I just can't work out what get_field_types in the grep block should be.
$schema->source('Foo')->column_info($_)->{data_type} eq 'datetime'
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
More information about the Dbix-class
mailing list