improvements to WebGUI::Test SQL cleanup
This commit is contained in:
parent
fe1ac66cca
commit
7f820d9f35
1 changed files with 11 additions and 2 deletions
|
|
@ -848,7 +848,14 @@ Example call:
|
|||
},
|
||||
'SQL' => sub {
|
||||
my (undef, $sql) = @_;
|
||||
return $CLASS->session->db->dbh->prepare($sql);
|
||||
my $db = $CLASS->session->db;
|
||||
my @params;
|
||||
if ( ref $sql ) {
|
||||
( $sql, @params ) = @$sql;
|
||||
}
|
||||
return sub {
|
||||
$db->write( $sql, \@params );
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -938,7 +945,9 @@ Example call:
|
|||
'CODE' => sub {
|
||||
(shift)->();
|
||||
},
|
||||
'SQL' => 'execute',
|
||||
'SQL' => sub {
|
||||
(shift)->();
|
||||
},
|
||||
);
|
||||
|
||||
sub cleanupGuard {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue