None available.
sub count_tests
{ my ($self, @args) = @_;
my $where = ' database_name = ? AND last_session_id = ?';
if ($args[2]) {
$where .= ' AND result IN (?)';
}
return $self->sql_count_tests($where)->select_val(@args); } |
sub database_names
{ my ($self, @args) = @_;
my $dbs = [];
my $where = ' species = ? AND last_session_id = ?';
my $sth = $self->sql_database_names($where);
$sth->execute(@args);
while (my $row = $sth->fetchrow_arrayref) {
push @$dbs, $row->[0];
}
return $dbs; } |
sub failed_by_species
{ my ($self, $session_type, @args) = @_;
$session_type .= '_session_id';
my $where = " AND species = ? AND $session_type = ?";
return $self->sql_failed_by_species($where)->select_val(@args); } |
sub failed_tests
{ my ($self, $database, $session_id, $type, $tc_action, $unannotated) = @_;
my $result = join "', '", @$type if $type;
my $action = join "', '", @$tc_action if $tc_action;
my $where = " database_name = ? AND last_session_id = ? AND r.result IN ('$result')";
my $isnull = $unannotated ? "or isnull(a.action)" : '';
if ($tc_action) {
$where .= qq(AND (a.action IN ('$action') $isnull ));
}
my $results = [];
my $sth = $self->sql_failed_tests($where);
$sth->execute($database, $session_id);
while (my $row = $sth->fetchrow_arrayref) {
push @$results, $row;
}
return $results; } |
sub reports
{ my ($self, $database, $session_id, $type, $tc_action, $unannotated) = @_;
my $result = join "', '", @$type if $type;
my $action = join "', '", @$tc_action if $tc_action;
my $where = ' database_name = ? AND last_session_id = ? ';
if ($result) {
$where .= " AND r.result IN ('$result')";
}
my $isnull = $unannotated ? 'or isnull(a.action)' : '';
if ($tc_action) {
$where .= qq(AND (a.action IN ('$action') $isnull ));
}
my $sth = $self->sql_reports($where);
$sth->execute($database, $session_id);
my @results = $self->sth_to_objects($sth);
return @results;
}
1; } |