- NAME
- SYNOPSIS

# NAME

GT::Session::TempTable - A session management module, subclassing GT::Session::SQL providing temp table support

# SYNOPSIS

Create a session: my $session = new GT::Session::TempTable({ db => GT::SQL->new( '/path/to/defs' ), def_path => '/path/to/defs', create_session => \&create_table_sub });

Create temp table controller table. (do once before using this module) $session->initial_create();

Create a new temp table: my ( $GT_SQL_Table_ref, $tmp_id ) = $session->new_set();

Get the GT::SQL::Table ref to a previous table: my $GT_SQL_Table_ref = $session->get_set( $tmp_id );

List all the sets for current session: my $href = $session->list_sets();

Save data with the session: $session->data (``Save this information!'');

Load a session. my $session = new GT::Session::TempTable ( $id ) or die ``Can't load session: '$id'.''

Delete a session: $session->delete();

Delete a table set: $session->delete_set( $tmp_id );

Cleanup old sessions, takes argument of number of seconds old. $session->cleanup ( 5000 );