DB::AsKVS - This module is using RDBMS as KVS.
#!/usr/bin/perl use strict; use warnings; use DB::AsKVS; my $param = { rdbms => [ { driver => 'mysql', dbname => 'demo', host => 'localhost', port => 3306, uid => 'root', pwd => 'password', opt => {}, }, ], memcached => [ { host => 'localhost', port => 11211, }, ], }; my $db = new DB::AsKVS($param); $db->create("RowKey"); $db->put("RowKey", "Key", "Value"); print $db->get("RowKey", "Key");
The DB::AsKVS module can use RDBMS as KVS. To use this module, You will be able to design architecture for scale out.
Constructor
my $db = new DB::AsKVS($param); * $param is parameter of RDBMS and Memcached. Please show SYNOPSIS section.
Methods
$db->create("RowKey"); Create the RowKey. $db->put("RowKey", "Key", "Value"); insert data. my $return_vaule = $db->get("RowKey", "Key"); This method pick up the data for matching "RowKey" and "Key". $return_value is scalar value. my $return_value = $db->get_multi("RowKey", "Part of Key value"); This method pick up the data for matching "RowKey" and "Key". $return_value is hash reference of Key and Value. $db->remove("RowKey", "Key"); This method is deleteing data for matching "RowKey" and "Key".
Kazunori Minoda (C)2013
5 POD Errors
The following errors were encountered while parsing the POD:
=pod directives shouldn't be over one line long! Ignoring all 7 lines of content
=pod directives shouldn't be over one line long! Ignoring all 8 lines of content
To install DB::AsKVS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DB::AsKVS
CPAN shell
perl -MCPAN -e shell install DB::AsKVS
For more information on module installation, please visit the detailed CPAN module installation guide.