Manual Reference Pages - DBIX::CLASS::SCHEMA::POPULATEMORE::COMMAND (3)
DBIx::Class::Schema::PopulateMore::Command - Command Class to Populate a Schema
This is a command pattern class to manage the job of populating a
DBIx::Class::Schema with information. We break this out because the
actual job is a bit complex, is likely to grow more complex, and so that
we can more easily identify refactorable and reusable parts.
This class defines the following attributes.
This is the Schema we are populating
contains a callback to the exception method supplied by DBIC
This is an arrayref of information used to populate tables in the database
How we know the value is really something to inflate or perform a substitution
on. This gets the namespace of the substitution plugin and its other data.
We define a visitor so that we can perform the value inflations and or
substitutions. This is still a little work in progress, but its getting
The index of previously inflated resultsets. Basically when we create a new
row in the table, we cache the result object so that it can be used as a
dependency in creating another.
Eventually will be moved into the constructor for a plugin
Set an index value to an inflated result
given an index, returns the related inflated resultset
Loads each of the available inflators, provider access to the objects
Holds an object that can perform dispatching to the inflators.
This module defines the following methods.
lazy build for the visitor attribute.
lazy build for the inflator_loader attribute
lazy build for the inflator_dispatcher attribute
The command classes main method. Returns a Hash of the created result
rows, where each key is the named index and the value is the row object.
Dispatch to the correct inflator
Given a hash suitable for a DBIx::Class::Resultset create method, attempt to
update or create a row in the named source.
returns the newly created row or throws an exception if there is a failure
Given a fields and values, combine to a hash suitable for using in a create_fixture
Correctly create an array from the fields, values variables, skipping those
where the value is undefined.
given a value that is either an arrayref or a scalar, put it into array context
and return that array.
Please see DBIx::Class::Schema::PopulateMore For authorship information
Please see DBIx::Class::Schema::PopulateMore For licensing terms.
|perl v5.20.3 ||DBIX::CLASS::SCHEMA::POPULATEMORE::COMMAND (3) ||2014-10-09 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.