[tools] testbot/orm: Remove the $ColPrefix BuildKeyWhere() parameter.
It is unused. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- 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 10cc1f3c3..dc527d465 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 " . -- 2.30.2
participants (1)
-
Francois Gouget