Andy Grundman > DBIx-Class-0.03003 > DBIx::Class::DB

Download:
DBIx-Class-0.03003.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  12
Open  18
Stalled  11
View/Report Bugs
Source   Latest Release: DBIx-Class-0.082810

NAME ^

DBIx::Class::DB - Simple DBIx::Class Database connection by class inheritance

SYNOPSIS ^

  package MyDB;

  use base qw/DBIx::Class/;
  __PACKAGE__->load_components('DB');

  __PACKAGE__->connection('dbi:...', 'user', 'pass', \%attrs);

  package MyDB::MyTable;

  use base qw/MyDB/;
  __PACKAGE__->load_components('Core');

  ...

DESCRIPTION ^

This class provides a simple way of specifying a database connection.

METHODS ^

storage

Which storage backend to be used. Defaults to DBIx::Class::Storage::DBI

class_resolver

Which class to use for resolving a class. Defaults to DBIx::Class::ClassResolver::Passthrough, which returns whatever you throw at it. See resolve_class below.

connection
  __PACKAGE__->connection($dsn, $user, $pass, $attrs);

Specifies the arguments that will be passed to DBI->connect(...) to instantiate the class dbh when required.

dbi_commit
  $class->dbi_commit;

Issues a commit again the current dbh

dbi_rollback
  $class->dbi_rollback;

Issues a rollback again the current dbh

AUTHORS ^

Matt S. Trout <mst@shadowcatsystems.co.uk>

LICENSE ^

You may distribute this code under the same terms as Perl itself.

syntax highlighting: