The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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

delete_context_property

See superclass Context::Set::Storage