DBIx:: StORM:: Class

DBIx::StORM::Class
Summary
A base class that can be used to turn a DBIx::StORM::Table into a class in another package.
Configure this class to specify connection and table information
Fetch the glob which contains the configuration hash
Fetch the configuration hash
Return an active DBIx::StORM object for this class.
Fetch a RecordSet of all the records in the table this class back on to.
Fetch a RecordSet of all the records in the table this meet the criteria of the filter $sub.
Initialise a newly created object of this class.
Serialise an object to a string description which can be used to fetch it back from the database later.
Recreate an object using the string obtained from serialise() and the database.
Create a new record object blessed into this class which will be stored in the underlying table.
As objects in this class are DBIx::StORM::Records too, you cannot directly change the hash entries as this would change the database.

DBIx:: StORM:: Class

DBIx::StORM::Class

A base class that can be used to turn a DBIx::StORM::Table into a class in another package.

This class inherits from DBIx::StORM::Record and adds methods to access the records in a given table.  Any records accessed will be automatically blessed into this class.

=end NaturalDocs

Summary
Configure this class to specify connection and table information
Fetch the glob which contains the configuration hash
Fetch the configuration hash
Return an active DBIx::StORM object for this class.
Fetch a RecordSet of all the records in the table this class back on to.
Fetch a RecordSet of all the records in the table this meet the criteria of the filter $sub.
Initialise a newly created object of this class.
Serialise an object to a string description which can be used to fetch it back from the database later.
Recreate an object using the string obtained from serialise() and the database.
Create a new record object blessed into this class which will be stored in the underlying table.
As objects in this class are DBIx::StORM::Records too, you cannot directly change the hash entries as this would change the database.

Functions

config (protected static)

Configure this class to specify connection and table information

Parameters

HashConfiguration information for this class

Returns

Nothing

=end NaturalDocs

__dbix_storm_get_config_glob (private static/ instance)

Fetch the glob which contains the configuration hash

Parameters

None

Returns

GlobRefthe glob containing the configuration hash

=end NaturalDocs

__dbix_storm_get_config (private static/ instance)

Fetch the configuration hash

Parameters

None

Returns

HashRefconfiguration information as passed to config()

=end NaturalDocs

__dbix_storm_make_connect (private static/ instance)

Return an active DBIx::StORM object for this class.  This may have been cached from an earlier call.

Parameters

None

Returns

ObjectDBIx::StORM connection

=end NaturalDocs

all (public static)

Fetch a RecordSet of all the records in the table this class back on to.

Parameters

None

Returns

ObjectDBIx::StORM::RecordSet of the records in the table

=end NaturalDocs

connection

sub connection

grep (public static)

Fetch a RecordSet of all the records in the table this meet the criteria of the filter $sub.

Parameters

CodeRef $subA filter subroutine that returns true for rows to be included

Returns

ObjectDBIx::StORM::RecordSet of the records in the table that match

=end NaturalDocs

_init (protected instance)

Initialise a newly created object of this class.  This differs to new in that new is called only for newly-created records that start life outside the database, while _init is called for all records including those fetched from the database.

Currently is does nothing, but is here so that it can be subclassed.

Parameters

None

Returns

Nothing

=end NaturalDocs

serialise (public instance)

Serialise an object to a string description which can be used to fetch it back from the database later.

By default, it serialises to the value of the primary key columns, joined with a comma.  Any commas or backslashes in these values are backslash-escaped

Parameters

None

Returns

Stringa serialised representation of this object

=end NaturalDocs

unserialise (public static)

Recreate an object using the string obtained from serialise() and the database.

Currently not implemented.

Parameters

String $stringthe serialised representation of the object

Returns

Objecta record blessed into this package

=end NaturalDocs

new (public static)

Create a new record object blessed into this class which will be stored in the underlying table.

Parameters

None

Returns

Objecta record blessed into this package

=end NaturalDocs

_stash (protected static)

As objects in this class are DBIx::StORM::Records too, you cannot directly change the hash entries as this would change the database.  This method returns a hash scratchpad which can be edited to store data.  It will not be saved between sessions.

Parameters

None

Returns

HashRefan in-memory scratchpad for this object

=end NaturalDocs

sub connection