NAME

DBIx::Custom::MySQL - a MySQL implementation of DBIx::Custom

SYNOPSYS

# Connect
my $dbi = DBIx::Custom::MySQL->connect(user      => 'taro', 
                                       password => 'kliej&@K',
                                       database  => 'your_database');

# Last insert id
my $id = $dbi->last_insert_id;

ATTRIBUTES

This class is DBIx::Custom subclass. You can use all attributes of DBIx::Custom

database

Database name

$dbi      = $dbi->database('your_database');
$database = $dbi->database;

host

Database host name.

$dbi  = $dbi->host('somehost.com');
$host = $dbi->host;

IP address can be set to host attribute.

$dbi->host('127.03.45.12');

port

Database port.

$dbi  = $dbi->port(1198);
$port = $dbi->port;

METHODS

This class is DBIx::Custom subclass. You can use all methods of DBIx::Custom.

connect - overridden

Connect to database.

# Connect
my $dbi = DBIx::Custom::MySQL->connect(user      => 'taro', 
                                       password => 'kliej&@K',
                                       database  => 'your_database');

last_insert_id

Last insert ID.

$last_insert_id = $dbi->last_insert_id;

This is equal to MySQL last_insert_id() function.