[Dbix-class] custom result source calling a stored procedure
Mitchell Elutovich
melutovich at gmail.com
Tue Jun 10 16:43:25 GMT 2014
Will misunderstood my question instead of the SELECT ...
can I do something like?
$new_source->name( \<<SQL );
call mystoredproc(?);
SQL
On Tue, Jun 10, 2014 at 7:59 AM, Will Crawford <billcrawford1970 at gmail.com>
wrote:
> $users->search (
> [
> { 'user_friends.user_id' => $id },
> { 'user_friends.friend_user_id' => $id }
> ], {
> join => 'user_friends'
> }
> )->all
>
>
>
> On 10 June 2014 12:18, Mitchell Elutovich <melutovich at gmail.com> wrote:
> > For a customer result source, I know we can do something such as:
> >
> > $new_source->name( \<<SQL );
> > ( SELECT u.* FROM user u
> > INNER JOIN user_friends f ON u.id = f.user_id
> > WHERE f.friend_user_id = ?
> > UNION
> > SELECT u.* FROM user u
> > INNER JOIN user_friends f ON u.id = f.friend_user_id
> > WHERE f.user_id = ? )
> > SQL
> >
> > is there any restrictions on the SQL; is it possible to have the SQL
> just be
> > a call to a stored procedure?
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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/20140610/1cb8c55c/attachment.htm>
More information about the DBIx-Class
mailing list