[Dbix-class] running stored procedures

Roger Day c.roger.day at gmail.com
Thu Oct 20 18:07:44 GMT 2011


Haha, I hadn't realised the significance of that code fragment first time
through. That will do the job.
Cheers
Roger

On Thu, Oct 20, 2011 at 6:39 PM, Peter Rabbitson <rabbit+dbic at rabbit.us>wro=
te:

> On Thu, Oct 20, 2011 at 06:17:30PM +0100, Roger Day wrote:
> > No, my stored procedure does not fail on sqlplus.
>
> I was referring to:
>
> http://lists.scsys.co.uk/pipermail/dbix-class/2011-October/010187.html
>
> >
> > It's your code that's failing. You wrap any call in a Select statement.
> > Select statements cannot contain semi-colons.
> >
> > select * from ( Begin <some random procedure>; End;) me;
> >
> > You can't have semi-colons in a middle of an embedded SQL statement.
>
> Right, so you asked DBIC to wrap whatever you gave it in a select
> statement,
> and are then complaining that DBIC wrapped it in a SELECT statement...
>
> >
> > Maybe your documentation can be a little more honest in describing what
> it
> > can, because currently, as far as I can see, and you haven't provided a
> > decent counter-argument, you cannot run any Oracle stored procedure from
> > within the result_source_instance->view_definition method.
>
> You are not calling a stored procedure, you are defining the stored proc =
on
> the fly - DBIC just did what you asked it to do
>
> The stuff you want to pull off needs to be done on a bare DBI handle,
> sidestepping DBIC (which is not designed to deal with random data sources
> in
> such manner). I gave you the answer to how to do this in my first email -
> $schema->storage->dbh_do (sub { my $dbh =3D $_[1]; ... code here })
>
> As far as the documentation - I do not see how it is ambiguous, but I wou=
ld
> gladly accept patches clearing this up from your point of view, either
> on-list, as an RT, or as a pull request on github.
>
> Cheers!
>
> _______________________________________________
> 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/dbix-class@lists.scsys.co.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20111020/ef3=
4ae98/attachment-0001.htm


More information about the DBIx-Class mailing list