[Dbix-class] Column Metadata
Christopher H. Laco
claco at chrislaco.com
Thu Nov 2 15:33:08 GMT 2006
Zbigniew Lukasiak wrote:
> Hi,
> =
> In InstantCRUD I've migrated from putting the labels (and other
> visuals) into the DBIC structures. It just felt not really clean
> having the presentation parts in the database layer.
> =
> -- =
> Zbyszek
> =
> On 11/2/06, John Napiorkowski <jjn1056 at yahoo.com> wrote:
>> Hi,
>>
>> Right now if I stuff extra things into the column
>> metadata info like so:
>>
>> __PACKAGE__->add_columns(
>> "thumbnail_path",
>> {
>> data_type =3D> "VARCHAR",
>> default_value =3D> "",
>> is_nullable =3D> 0,
>> size =3D> 255,
>> label =3D> "Thumbnail Path",
>> field_type=3D>"Textfield",
>> },
>>
>> I can retrieve that via the result_source column info
>> method. My question is do people think me putting my
>> metadata here is a bad idea, in the sense that in some
>> future revision of DBIx the metadata will have some
>> sort of enforcement and won't support my arbitrary key
>> values anymore?
>>
>> Thanks!
>>
>>
>> John
>>
I would say this is the proper separation. Things in column_info should
be restricted to describing what the field _is_, not what it _does_ or
where it's used. So, stick to DB meta information..sizes, types,
defaults, nullable, primary, etc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://jules.scsys.co.uk/pipermail/dbix-class/attachments/20061102/e9=
1605f0/signature.pgp
More information about the Dbix-class
mailing list