Context::Set::Storage::DBIC - Manage context persistence in a DBIx::Class::ResultSet
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 }); ...
See super class Context::Set::Storage
See superclass Context::Set::Storage
To install Context::Set, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Context::Set
CPAN shell
perl -MCPAN -e shell install Context::Set
For more information on module installation, please visit the detailed CPAN module installation guide.