Steve Kirkup <[EMAIL PROTECTED]> writes:

> When I establish my connection to the database I want to immediately run
> some SQL to initialize the databases session environment (specifically
> the NLS_DATE_FORMAT  for Oracle).

This is exactly what the "on_connet_do" attribute to ->connect is for:

<http://search.cpan.org/~jrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Storage/DBI.pm#connect_info>

> My question is how do I get ahold of that database handle?  The
> DBIx::Class::Schema->connect() makes no mention of one being available.

You don't want to do that manually, since 1) DBIC only connects when it
needs too and 2) it won't get rerun if DBIC has to reconnect for some
reason.

-- 
ilmari
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to