Kosuke Arisawa > DBIx-DBHResolver-0.02 > DBIx::DBHResolver::Strategy::Remainder

Download:
DBIx-DBHResolver-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source   Latest Release: DBIx-DBHResolver-0.17

NAME ^

DBIx::DBHResolver::Strategy::Remainder - Key based sharding strategy.

SYNOPSIS ^

  use DBIx::DBHResolver;

  DBIx::DBHResolver->load('/path/to/config.yaml');

  my $odd_number = 7;
  my $conn_info  = DBIx::DBHResolver->connect_info('MASTER', +{ strategy => 'Remainder', key => $odd_number });

DESCRIPTION ^

DBIx::DBHResolver::Strategy::Remainder is key based sharding strategy depends on remainder divided key by number of nodes.

AUTHOR ^

Kosuke Arisawa <arisawa@gmail.com>

SEE ALSO ^

DBIx::DBHResolver
DBI

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: