- map { [$ct, $_->{user}, $_->{score}, $_->{rank}] } @{$self->standings($ct)->{st}}
- } $self->{dbis}->select('contests', 'id')->flat;
-
- $self->{dbis}->begin;
- $self->{dbis}->delete('problem_status');
- $self->{dbis}->query('INSERT INTO problem_status (problem,owner,job,solved) VALUES (??)', @$_) for @problem_statuses;
- $self->{dbis}->delete('contest_status');
- $self->{dbis}->query('INSERT INTO contest_status (contest,owner,score,rank) VALUES (??)', @$_) for @contest_statuses;
- $self->{dbis}->commit
+ map { [$ct, $_->{user}, $_->{score}, $_->{rank}] } @{standings($ct)->{st}}
+ } $db->select('contests', 'id')->flat;
+
+ $db->begin;
+ $db->delete('problem_status');
+ $db->query('INSERT INTO problem_status (problem,owner,job,solved) VALUES (??)', @$_) for @problem_statuses;
+ $db->delete('contest_status');
+ $db->query('INSERT INTO contest_status (contest,owner,score,rank) VALUES (??)', @$_) for @contest_statuses;
+ $db->commit