[Dbix-class] executing pl/sql block in dbic
Matt S Trout
dbix-class at trout.me.uk
Sat Aug 4 17:29:17 GMT 2007
On Fri, Aug 03, 2007 at 08:17:12PM +0200, Marc Lambrichs | Mélange IT wrote:
> How should I handle executing a pl/sql-block in dbic? Actually I
> think there should be 2 answers to this question:
>
> 1. If you just want to execute an arbitrary block of pl/sql, you
> should be able to call it from an DBIx::Class::Schema instance.
$schema->storage->dbh->do('func()');
> 2. If you wanted to call a stored procedure, say a function that
> returns an id of a table 'account' for instance, you would like to
> add a wrapper subroutine that automagically inflates the id to the
> appropriate object. I'm not sure if this should be part of the schema.
http://search.cpan.org/~mstrout/DBIx-Class-0.08003/lib/DBIx/Class/Manual/Cookbook.pod#Arbitrary_SQL_through_a_custom_ResultSource
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/
More information about the DBIx-Class
mailing list