On 11/2/06, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
I still think its a great place to put meta-info that goes beyond what the DB traditionally knows. For example, in one of my DBIC apps, I had two data types called "Gauge" and "Percentage". Both are stored in columns that have the datatype "real" at the DB level. So I have in my column_info an extra parameter "stat_data_type" for this, to differentiate them where it matters. Ideally DBIC should know all of the metainfo that it can about your data, even if the DB is incapable of representing or using some of it. Labels are another good example. Putting a "label => 'Street Address'" in the attributes of a column does not violate any kind of separation. That label can be re-used in a command-line setting as easily as a web setting, it is universal in that sense.
-- Brandon
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.
I still think its a great place to put meta-info that goes beyond what the DB traditionally knows. For example, in one of my DBIC apps, I had two data types called "Gauge" and "Percentage". Both are stored in columns that have the datatype "real" at the DB level. So I have in my column_info an extra parameter "stat_data_type" for this, to differentiate them where it matters. Ideally DBIC should know all of the metainfo that it can about your data, even if the DB is incapable of representing or using some of it. Labels are another good example. Putting a "label => 'Street Address'" in the attributes of a column does not violate any kind of separation. That label can be re-used in a command-line setting as easily as a web setting, it is universal in that sense.
-- Brandon
_______________________________________________ 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]/
