| 1 |
NAME |
| 2 |
Catalyst::Model::CDBI - CDBI Model Class |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
# use the helper |
| 6 |
create model CDBI CDBI dsn user password |
| 7 |
|
| 8 |
# lib/MyApp/Model/CDBI.pm |
| 9 |
package MyApp::Model::CDBI; |
| 10 |
|
| 11 |
use base 'Catalyst::Model::CDBI'; |
| 12 |
|
| 13 |
__PACKAGE__->config( |
| 14 |
dsn => 'dbi:Pg:dbname=myapp', |
| 15 |
password => '', |
| 16 |
user => 'postgres', |
| 17 |
options => { AutoCommit => 1 }, |
| 18 |
relationships => 1 |
| 19 |
); |
| 20 |
|
| 21 |
1; |
| 22 |
|
| 23 |
# As object method |
| 24 |
$c->comp('MyApp::Model::CDBI::Table')->search(...); |
| 25 |
|
| 26 |
# As class method |
| 27 |
MyApp::Model::CDBI::Table->search(...); |
| 28 |
|
| 29 |
DESCRIPTION |
| 30 |
This is the "Class::DBI", "Class::DBI::Loader" model class. |
| 31 |
|
| 32 |
SEE ALSO |
| 33 |
Catalyst, Class::DBI |
| 34 |
|
| 35 |
AUTHOR |
| 36 |
Sebastian Riedel, "[email protected]" |
| 37 |
|
| 38 |
COPYRIGHT |
| 39 |
This program is free software, you can redistribute it and/or modify it |
| 40 |
under the same terms as Perl itself. |
| 41 |
|