Kazunori Minoda > DB-AsKVS-0.02 > DB::AsKVS

Download:
DB-AsKVS-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

DB::AsKVS - This module is using RDBMS as KVS.

SYNOPSIS ^

 #!/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");

DISCRIPTION ^

The DB::AsKVS module can use RDBMS as KVS. To use this module, You will be able to design architecture for scale out.

Usage ^

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".

Copyright ^

Kazunori Minoda (C)2013

syntax highlighting: