NAME
Mixin::ExtraFields::Driver::DBIC - store Mixin::ExtraFields data in a DBIx::Class store
VERSION
version 0.005
DESCRIPTION
This class provides a driver for storing Mixin::ExtraFields data in DBIx::Class storage. You'll need to create a table resultsource for the storage of entires and you'll need to use Mixin::ExtraFields in the class that gets the extras.
So, you might create:
package My::Schema::ObjectExtra;
use Mixin::ExtraFields::Driver::DBIC -setup => { table => 'object_extras' };
1;
...and elsewhere;
package My::Schema::Object;
use parent 'DBIx::Class';
...
use Mixin::ExtraFields -fields => {
driver => { class => 'DBIC', rs_moniker => 'ObjectExtra' }
};
PERL VERSION
This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
DRIVER ARGS
The following arguments may be provided when defining the driver when setting up Mixin::ExtraFields:
schema - the schema for the DBIx::Class storage (see below)
rs_moniker - the moniker of the result source for extras
id_column - the name of the column that stores object ids
name_column - the name of the column that stores extra field names
value_column - the name of the column that stores extra field values
schema
may be an actual DBIx::Class::Schema object or a coderef which, when called on an object, returns a schema. The default value assumes that objects will be DBIx::Class::Row objects, and returns their schema.
SETUP ARGS
When using Mixin::ExtraFields::Driver::DBIC to set up a table result source, the following values may be in the argument to -setup
in the import call:
table - (required) the name of the table in the storage
id_column - the name of the column that stores object ids
name_column - the name of the column that stores extra field names
value_column - the name of the column that stores extra field values
AUTHOR
Ricardo SIGNES <cpan@semiotic.systems>
CONTRIBUTOR
Ricardo Signes <rjbs@semiotic.systems>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.