Re: CDBI::Loader::Pg
[prev]
[thread]
[next]
[Date index for 2004/12/28]
Simon Flack wrote:
> Sean Davis wrote:
>
>> In answer to my own question, I see that I need to call dbi_commit()
>> if I have AUTOCOMMIT off (which it is by default in Pg). Is there a
>> way to pass the AUTOCOMMIT parameter to DBI using CDBI::Loader?
>
>
> __PACKAGE__->connection($dsn, $user, $pass, {AutoCommit => 1});
For CDBI::Loader, set the DBI options in the 'options' slot:
Class::DBI::Loader->new(
dsn => 'dbi:Pg:dbname=beerdb',
options => { AutoCommit => 1 },
);
Incidentally, 'options' isn't currently documented.
--simonflk