Skip to content

Commit

Permalink
Document update_points method and its limitation to MySQL.
Browse files Browse the repository at this point in the history
  • Loading branch information
mateu committed Mar 29, 2010
1 parent 4f70e66 commit 58d72c1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Bracket/Model/DBIC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(schema_class => 'Bracket::Schema',);

=head2 update_points
SQL update of points that is way faster than player_points action in Admin.
DRAWBACK: only tested on MySQL, may be MySQL specfic update.
SOLUTION: Find DBIC way of doing it? Use sub-query.
=cut

sub update_points {
my $self = shift;
my $storage = $self->schema->storage;
Expand All @@ -31,8 +39,6 @@ sub update_points {
;'
);
$sth->execute();
my @rows = @{$sth->fetchall_arrayref()};
return @rows;
}
);
}
Expand Down

0 comments on commit 58d72c1

Please sign in to comment.