logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catalyst::Model::CDBI - [DEPRECATED] CDBI Model Class

Author

       Sebastian Riedel, "sri@cpan.org"

Contributors

       mst: Matt S Trout "mst@shadowcat.co.uk"

       Arathorn: Matthew Hodgson "matthew@arasphere.net"

Description

       This is the "Class::DBI" model class. It's built on top of "Class::DBI::Loader". "Class::DBI" is
       generally not used for new applications, with "DBIx::Class" being preferred instead. As such this model
       is deprecated and (mostly) unmaintained.

       It is preserved here for older applications which still need it for backwards compatibility.

   new
       Initializes Class::DBI::Loader and loads classes using the class config. Also attempts to borg all the
       classes.

Name

       Catalyst::Model::CDBI - [DEPRECATED] CDBI Model Class

See Also

       Catalyst, Class::DBI Class::DBI::Loader

Synopsis

           # use the helper
           create model CDBI CDBI dsn user password

           # lib/MyApp/Model/CDBI.pm
           package MyApp::Model::CDBI;

           use base 'Catalyst::Model::CDBI';

           __PACKAGE__->config(
               dsn           => 'dbi:Pg:dbname=myapp',
               password      => '',
               user          => 'postgres',
               options       => { AutoCommit => 1 },
               relationships => 1
           );

           1;

           # As object method
           $c->comp('MyApp::Model::CDBI::Table')->search(...);

           # As class method
           MyApp::Model::CDBI::Table->search(...);

See Also