Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Precalc nparams in mysql storage

  • Loading branch information...
commit dbe8812e1c7f71f5305b20784e968053e2c7cf0d 1 parent 1da93a2
@tsee authored
Showing with 8 additions and 1 deletion.
  1. +2 −0  Changes
  2. +1 −1  dist.ini
  3. +5 −0 lib/ShardedKV/Storage/MySQL.pm
View
2  Changes
@@ -2,6 +2,8 @@ Revision history for Perl extension Foo.
{{$NEXT}}
+ - Minor MySQL storage fixup
+
0.10 2012-05-08 09:43:54 Europe/Berlin
- MySQL storage: more documentation and minor
View
2  dist.ini
@@ -1,5 +1,5 @@
name = ShardedKV
-version = 0.10
+version = 0.11
author = Steffen Mueller <smueller@cpan.org>
author = Nick Perez <nperez@cpan.org>
license = Perl_5
View
5 lib/ShardedKV/Storage/MySQL.pm
@@ -217,11 +217,16 @@ has '_number_of_params' => (
builder => '_calc_no_params',
);
+sub BUILD {
+ $_[0]->_number_of_params;
+};
+
sub _calc_no_params {
my $self = shift;
return 1 + scalar(@{$self->value_col_names});
}
+
sub _make_get_query {
my $self = shift;
$self->_number_of_params; # prepopulate
Please sign in to comment.
Something went wrong with that request. Please try again.