[Jifty-commit] r3539 - in Jifty-DBI/trunk: lib/Jifty
lib/Jifty/DBI/Filter
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Jun 20 18:41:34 EDT 2007
Author: sterling
Date: Wed Jun 20 18:41:34 2007
New Revision: 3539
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI.pm
Jifty-DBI/trunk/lib/Jifty/DBI/Filter/Truncate.pm
Log:
r4111 at riddle: andrew | 2007-03-18 12:31:53 -0500
Added documentation to Jifty::DBI::Filter::Truncate and removed empty file lib/Jifty/DBI/Filter/JiftyRecord.pm
Modified: Jifty-DBI/trunk/lib/Jifty/DBI.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI.pm Wed Jun 20 18:41:34 2007
@@ -203,6 +203,11 @@
this HowTo to discuss using container classes, overloading, and what
ever else I think of.
+=head1 LICENSE
+
+Jifty::DBI is Copyright 2005-2007 Best Practical Solutions, LLC.
+Jifty::DBI is distributed under the same terms as Perl itself.
+
=cut
1;
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Filter/Truncate.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Filter/Truncate.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Filter/Truncate.pm Wed Jun 20 18:41:34 2007
@@ -8,23 +8,23 @@
=head1 NAME
-Jifty::DBI::Filter::Truncate - Truncates column values
+Jifty::DBI::Filter::Truncate - Filter used to enforce max_length column trait
=head1 DESCRIPTION
-This filter truncates column values to the correct length for their
-type or to a defined max_length (for non-numeric columns).
+You do not need to use this filter explicitly. This filter is used internally to enforce the L<Jifty::DBI::Schema/max_length> retrictions on columns:
-=head2 encode
+ column name =>
+ type is 'text',
+ max_length is 10;
+
+In this case, the filter would be automatically added to the column named C<name> and any value put into the column longer than 10 characters would be truncated to 10 characters.
-If the column is a non-numeric type and has a max_length defined,
-encode will truncate to that length. If the column is of a
-type limited by definition (e.g. C<char(13)>), encode will truncate
-the value to fit.
+=head1 METHODS
-=head1 SEE ALSO
+=head2 encode
-L<Jifty::DBI::Filter>
+This method performs the work of performing truncation, when necessary.
=cut
@@ -58,4 +58,11 @@
}
}
+=head1 LICENSE
+
+Jifty::DBI is Copyright 2005-2007 Best Practical Solutions, LLC.
+Jifty::DBI is distributed under the same terms as Perl itself.
+
+=cut
+
1;
More information about the Jifty-commit
mailing list