[Bps-public-commit] dbix-searchbuilder branch, master, updated. 5ffc2f934083c48f3b586c7bb9cbddeba619301e

Ruslan Zakirov ruz at bestpractical.com
Thu Jul 16 19:13:28 EDT 2009


The branch, master has been updated
       via  5ffc2f934083c48f3b586c7bb9cbddeba619301e (commit)
      from  3ed351b6d5ae5ba73dd8558ce3123b3408e532a2 (commit)

Summary of changes:
 SearchBuilder/Handle.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 5ffc2f934083c48f3b586c7bb9cbddeba619301e
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date:   Fri Jul 17 03:13:06 2009 +0400

    * spread regexp we use in Pg to generic Handle

diff --git a/SearchBuilder/Handle.pm b/SearchBuilder/Handle.pm
index cd1c454..5addc61 100755
--- a/SearchBuilder/Handle.pm
+++ b/SearchBuilder/Handle.pm
@@ -678,7 +678,8 @@ sub _MakeClauseCaseInsensitive {
     my $operator = shift;
     my $value = shift;
 
-    if ($value !~ /^\d+$/) { # don't downcase integer values
+    # don't downcase integer values and things that looks like dates
+    if ($value !~ /^['"]?[-\d: ]+['"]$/) {
         $field = "lower($field)";
         $value = lc($value);
     }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list