Вячеслав Тихановский > MojoX-Session > MojoX::Session::Store::DBIC

Download:
MojoX-Session-0.25.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

MojoX::Session::Store::DBIC - DBIx::Class Store for MojoX::Session

SYNOPSIS ^

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

    my $schema = DB->connect($dsn, $user, $pass, \%attr);
    my $rs = $schema->resultset('Session');
    my $session = MojoX::Session->new(
        store => MojoX::Session::Store::DBI->new(resultset => $rs),
        ...
    );

DESCRIPTION ^

MojoX::Session::Store::DBIC is a store for MojoX::Session that stores a session in a database using DBIx::Class.

ATTRIBUTES ^

MojoX::Session::Store::DBIC implements the following attributes.

resultset

    my $resultset = $store->resultset;
    $resultset    = $store->resultset(resultset);

Get and set DBIx::Class::ResultSet object.

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::DBIC 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.

AUTHOR ^

William Ono

COPYRIGHT ^

Copyright (C) 2008, Viacheslav Tykhanovskyi.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.

syntax highlighting: