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 <billcrawford1...@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 <melutov...@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 >
_______________________________________________ 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