[svn:p5ee] r9895 - p5ee/trunk/App-Repository/lib/App/Repository

[email protected]
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Tue Aug 28 08:41:59 2007
New Revision: 9895

Modified:
   p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm

Log:
don't regard an undef value for a parameter unless the op is '=' or '!='

Modified: p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm	(original)
+++ p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm	Tue Aug 28 08:41:59 2007
@@ -743,7 +743,7 @@
                 if (!$sqlop || $sqlop eq "=") {
                     push(@where, "$column is null");
                 }
-                else {
+                elsif ($sqlop eq "!=") {
                     push(@where, "$column is not null");
                 }
             }
@@ -1349,7 +1349,15 @@
 
             if (! defined $value) {
                 # $value = "?";   # TODO: make this work with the "contains/matches" operators
-                $sqlop = (!$sqlop || $sqlop eq "=") ? "is" : "is not";
+                if (!$sqlop || $sqlop eq "=") {
+                    $sqlop = "is";
+                }
+                elsif ($sqlop eq "!=") {
+                    $sqlop = "is not";
+                }
+                else {
+                    next;
+                }
                 $value = "null";
             }
             else {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.