cvsuser 03/10/24 13:12:50
Modified: App-Repository/lib/App/Repository DBI.pm
Log:
renamed awkward _query.critsense to _conjunction and made it case-insensitive
Revision Changes Path
1.13 +10 -9 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.12
retrieving revision 1.13
diff -u -w -r1.12 -r1.13
--- DBI.pm 8 Oct 2003 14:54:57 -0000 1.12
+++ DBI.pm 24 Oct 2003 20:12:50 -0000 1.13
@@ -1,13 +1,13 @@
######################################################################
-## File: $Id: DBI.pm,v 1.12 2003/10/08 14:54:57 spadkins Exp $
+## File: $Id: DBI.pm,v 1.13 2003/10/24 20:12:50 spadkins Exp $
######################################################################
use App;
use App::Repository;
package App::Repository::DBI;
-$VERSION = do { my @r=(q$Revision: 1.12 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
+$VERSION = do { my @r=(q$Revision: 1.13 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
@ISA = ( "App::Repository" );
@@ -1113,7 +1113,7 @@
# create the SQL statement
############################################################
- my ($sql, $critsense);
+ my ($sql, $conjunction);
if ($#select_phrase >= 0) {
$sql = "select\n " .
@@ -1129,18 +1129,19 @@
if ($#join_conditions >= 0) {
$sql .= "where " . join("\n and ",@join_conditions) . "\n";
}
- $critsense = "AND";
- $critsense = $params->{"_query.critsense"} if (defined $params);
- $critsense = "AND" if (!defined $critsense);
+ $conjunction = "AND";
+ $conjunction = $params->{"_conjunction"} if (defined $params);
+ $conjunction = "AND" if (!defined $conjunction);
+ $conjunction = uc($conjunction);
if ($#criteria_conditions >= 0) {
$sql .= ($#join_conditions == -1 ? "where " : " and ");
- if ($critsense eq "NOT_AND") {
+ if ($conjunction eq "NOT_AND") {
$sql .= "not (" . join("\n and ",@criteria_conditions) . ")\n";
}
- elsif ($critsense eq "NOT_OR") {
+ elsif ($conjunction eq "NOT_OR") {
$sql .= "not (" . join("\n or ",@criteria_conditions) . ")\n";
}
- elsif ($critsense eq "OR") {
+ elsif ($conjunction eq "OR") {
$sql .= "(" . join("\n or ",@criteria_conditions) . ")\n";
}
else {