MojoX::Session::Store:User(Contributed Perl DocuMojoX::Session::Store::Dbi(3p)



NAME
       MojoX::Session::Store::DBI - DBI Store for MojoX::Session

SYNOPSIS
           CREATE TABLE session (
               sid          VARCHAR(40) PRIMARY KEY,
               data         TEXT,
               expires      INTEGER UNSIGNED NOT NULL,
               UNIQUE(sid)
           );

           my $session = MojoX::Session->new(
               store => MojoX::Session::Store::DBI->new(dbh  => $dbh),
               ...
           );

DESCRIPTION
       MojoX::Session::Store::DBI is a store for MojoX::Session that stores a
       session in a database.

ATTRIBUTES
       MojoX::Session::Store::DBI implements the following attributes.

   "dbh"
           my $dbh = $store->dbh;
           $store  = $store->dbh($dbh);

       Get and set dbh handler.

   "table"
       Table name. Default is 'session'.

   "sid_column"
       Session id column name. Default is 'sid'.

   "expires_column"
       Expires column name. Default is 'expires'.

   "data_column"
       Data column name. Default is 'data'.

METHODS
       MojoX::Session::Store::DBI inherits all methods from
       MojoX::Session::Store.

   "create"
       Insert session to database.

   "update"
       Update session in database.

   "load"
       Load session from database.

   "delete"
       Delete session from database.



perl v5.12.2                      2010-12-30    MojoX::Session::Store::Dbi(3p)
