NAME
Class::orMapper::Memcached - DBI base easy O/R Mapper with Memcached.
SYNOPSIS
use Class::orMapper::Memcached;
my $read_database = {
dsn => 'dbi:xxxx:dbname=xxxx;host=localhost;port=xxxx',
uid => 'xxxx',
pwd => 'xxxx',
opt => {AutoCommit => 0},
};
my $write_database = {
dsn => 'dbi:xxxx:dbname=xxxx;host=localhost;port=xxxx',
uid => 'xxxx',
pwd => 'xxxx',
opt => {AutoCommit => 0},
};
my $memcached = {
servers => [qw/localhost:11211/],
};
my $db = new Class::orMapper::Memcached($read_database, $write_database, $memcached);
DESCRIPTION
This Module is easy database operation module with memcached.
Usage
my $data = $db->select_n_arrayref_c($sql,$value);
my $data = $db->select_n_hashref_c($sql,$value);
ex.) my $sql = "select * from test where hoge=?";
my $value = [qw/abc/];
my $data = $db->select_arrayref_c($param);
my $data = $db->select_hashref_c($param);
ex.)
$param = {
table => 'table_name',
columns => [aaa,bbb,ccc],
where => [
{xxx => {'=' => 'value1', '>' => 'value2'}},
{xxx => [qw/abc def cfg/],
],
order => {'yyy' => 'desc', 'zzz' => 'asc'},
};
Copyright
Kazunori Minoda (c)2012