Francois Gouget : testbot/orm: Remove the $ColPrefix BuildKeyWhere() parameter.
Alexandre Julliard
julliard at winehq.org
Thu May 19 16:11:13 CDT 2022
Module: tools
Branch: master
Commit: e2614f1495ae61213819b20da09be56147019b2b
URL: https://source.winehq.org/git/tools.git/?a=commit;h=e2614f1495ae61213819b20da09be56147019b2b
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Thu May 19 19:14:14 2022 +0200
testbot/orm: Remove the $ColPrefix BuildKeyWhere() parameter.
It is unused.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/lib/ObjectModel/DBIBackEnd.pm | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/testbot/lib/ObjectModel/DBIBackEnd.pm b/testbot/lib/ObjectModel/DBIBackEnd.pm
index 10cc1f3..dc527d4 100644
--- a/testbot/lib/ObjectModel/DBIBackEnd.pm
+++ b/testbot/lib/ObjectModel/DBIBackEnd.pm
@@ -132,9 +132,9 @@ sub FromDb($$$)
return $Value;
}
-sub BuildKeyWhere($$$$)
+sub BuildKeyWhere($$$)
{
- my ($self, $PropertyDescriptors, $ColPrefix, $Where) = @_;
+ my ($self, $PropertyDescriptors, $Where) = @_;
foreach my $PropertyDescriptor (@{$PropertyDescriptors})
{
@@ -146,7 +146,7 @@ sub BuildKeyWhere($$$$)
{
$Where .= " AND ";
}
- $Where .= $ColPrefix . $ColName . " = ?";
+ $Where .= "$ColName = ?";
}
}
}
@@ -363,8 +363,7 @@ sub LoadItem($$$)
$Where = join(" = ? AND ", @{$MasterColNames}) . " = ?";
push @Data, @{$MasterColValues};
}
- $Where = $self->BuildKeyWhere($Collection->GetPropertyDescriptors(), "",
- $Where);
+ $Where = $self->BuildKeyWhere($Collection->GetPropertyDescriptors(), $Where);
push @Data, $Collection->SplitKey($RequestedKey);
my $Query = "SELECT $Fields FROM " . $Collection->GetTableName();
@@ -480,7 +479,7 @@ sub BuildUpdateStatement($$$$)
{
$Where = join(" = ? AND ", @{$MasterColNames}) . " = ?";
}
- $Where = $self->BuildKeyWhere($PropertyDescriptors, "", $Where);
+ $Where = $self->BuildKeyWhere($PropertyDescriptors, $Where);
return "UPDATE $TableName SET $Fields WHERE $Where";
}
@@ -606,8 +605,7 @@ sub DeleteItem($$)
$Where = join(" = ? AND ", @{$MasterColNames}) . " = ?";
push @Data, @{$MasterColValues};
}
- $Where = $self->BuildKeyWhere($Item->GetPropertyDescriptors(), "",
- $Where);
+ $Where = $self->BuildKeyWhere($Item->GetPropertyDescriptors(), $Where);
push @Data, $Item->GetKeyComponents();
my $Statement = $self->GetDb()->prepare("DELETE FROM " .
More information about the wine-cvs
mailing list