[Bast-commits] r7345 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Aug 20 06:19:08 GMT 2009
Author: ribasushi
Date: 2009-08-20 06:19:07 +0000 (Thu, 20 Aug 2009)
New Revision: 7345
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
Log:
Apply pod patch by arthas (slightly modified)
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm 2009-08-20 05:50:49 UTC (rev 7344)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm 2009-08-20 06:19:07 UTC (rev 7345)
@@ -18,6 +18,7 @@
__PACKAGE__->load_components(qw/InflateColumn::DateTime Core/);
__PACKAGE__->add_columns(
starts_when => { data_type => 'datetime' }
+ create_date => { data_type => 'date' }
);
NOTE: You B<must> load C<InflateColumn::DateTime> B<before> C<Core>. See
@@ -69,6 +70,16 @@
that this feature is new as of 0.07, so it may not be perfect yet - bug
reports to the list very much welcome).
+If the data_type of a field is C<date>, C<datetime> or C<timestamp> (or
+a derivative of these datatypes, e.g. C<timestamp with timezone>, this
+module will automatically call the appropriate parse/format method for
+deflation/inflation as defined in the storage class. For instance, for
+a C<datetime> field the methods C<parse_datetime> and C<format_datetime>
+would be called on deflation/inflation. If the storage class does not
+provide a specialized inflator/deflator, C<[parse|format]_datetime> will
+be used as a fallback. See L<DateTime::Format> for more information on
+date formatting.
+
For more help with using components, see L<DBIx::Class::Manual::Component/USING>.
=cut
More information about the Bast-commits
mailing list