cvs commit: p5ee/App-Repository/lib/App/Repository DBI.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     06/02/08 14:11:48

  Modified:    App-Repository/lib/App/Repository DBI.pm
  Log:
  .eq means =, not infer IN
  
  Revision  Changes    Path
  1.36      +8 -4      p5ee/App-Repository/lib/App/Repository/DBI.pm
  
  Index: DBI.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Repository/lib/App/Repository/DBI.pm,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- DBI.pm	6 Feb 2006 04:21:01 -0000	1.35
  +++ DBI.pm	8 Feb 2006 22:11:48 -0000	1.36
  @@ -641,10 +641,12 @@
                   if ($param =~ /^begin_(.*)/) {
                       $column = $1;
                       $sqlop = ">=";
  +                    $inferred_op = 0;
                   }
                   elsif ($param =~ /^end_(.*)/) {
                       $column = $1;
                       $sqlop = "<=";
  +                    $inferred_op = 0;
                   }
                   $column_def = $tabcols->{$column};
               }
  @@ -700,7 +702,7 @@
                       $value =~ s/\?/_/g;
                       $value = "'$value'";
                   }
  -                elsif ($sqlop eq "in" || $sqlop eq "=") {
  +                elsif ($sqlop eq "in" || ($inferred_op && $sqlop eq "=")) {
                       if (! defined $value || $value eq "NULL") {
                           $sqlop = "is";
                           $value = "null";
  @@ -1158,10 +1160,12 @@
               if ($param =~ /^begin_(.*)/) {
                   $column = $1;
                   $sqlop = ">=";
  +                $inferred_op = 0;
               }
               elsif ($param =~ /^end_(.*)/) {
                   $column = $1;
                   $sqlop = "<=";
  +                $inferred_op = 0;
               }
               $column_def = $table_def->{column}{$column};
           }
  @@ -1216,7 +1220,7 @@
                   $paramvalue =~ s/\?/_/g;
                   $paramvalue = "'$paramvalue'";
               }
  -            elsif ($sqlop eq "in" || $sqlop eq "=") {
  +            elsif ($sqlop eq "in" || ($inferred_op && $sqlop eq "=")) {
   
                   if (! defined $paramvalue || $paramvalue eq "NULL") {
                       $sqlop = "is";
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.