Jerome Eteve > Context-Set-0.01 > Context::Set::Storage::DBIC

Download:
Context-Set-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Context-Set-0.02

NAME ^

Context::Set::Storage::DBIC - Manage context persistence in a DBIx::Class::ResultSet

MANUAL ^

This storage allows you to store your contexts and their values in a DBIC Resultset.

This resultset MUST have the following columns:

  id: A unique numeric ID. Be generous (BIG NUM) as this will be incremented each time there's
     a new value for a property. This is the only unique key.

  context_name: NOT NULL - A long enough VARCHAR. 512 is a good size. It must be able to contain
                the longest context fullname possible for your application. No default.

  key         : NOT NULL - A long enough VARCHAR. Must be able to contain the longest possible
                property name for your application. No default.

  is_array : NOT NULL - A boolean. No default.

  value: CAN BE NULL. Something capable of holding any Perl string or number. VARCHAR(512) Is a good starting point.

Additionaly you may want to consider adding the following indices:

  (context_name)  and (context_name, key)

Usage:

  my $storage = Context::Set::Storage::DBIC->new({ resultset => $schema->resultset('Context::SetValues') });
  my $cm = Context::Set::Manager->new({ storage => $storage });
  ...

populate_context

See super class Context::Set::Storage

set_context_property

See superclass Context::Set::Storage

syntax highlighting: