[Jifty-commit] jifty-dbi branch, master, updated. 0.60-7-g1cb71cb
Jifty commits
jifty-commit at lists.jifty.org
Mon May 3 06:09:09 EDT 2010
The branch, master has been updated
via 1cb71cb14b5fe280689d8edaac8cfa9ff304df81 (commit)
from 2699ce046db862ce242fc8fa4ed68695df610178 (commit)
Summary of changes:
lib/Jifty/DBI/Column.pm | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 1cb71cb14b5fe280689d8edaac8cfa9ff304df81
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon May 3 18:09:12 2010 +0800
Column->is_boolean
diff --git a/lib/Jifty/DBI/Column.pm b/lib/Jifty/DBI/Column.pm
index 014f183..4f9fd16 100644
--- a/lib/Jifty/DBI/Column.pm
+++ b/lib/Jifty/DBI/Column.pm
@@ -127,6 +127,18 @@ sub is_string {
return 0;
}
+=head2 is_boolean
+
+Returns true if this column is a boolean
+
+=cut
+
+sub is_boolean {
+ my $self = shift;
+ return 1 if grep { $_->isa('Jifty::DBI::Filter::Boolean') } $self->output_filters;
+ return 1 if $self->type =~ /BOOL/i;
+ return 0;
+}
=head2 serialize_metadata
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list