[Dbix-class] select * from function('param')

Daniel Westermann-Clark dwc at pobox.com
Fri Jul 28 06:38:59 CEST 2006


On 2006-07-27 22:38:02 +0000, mock wrote:
> So I've got a function in my Pg database which takes a single
> parameter and returns a set of rows.
> 
> "select * from function('param')" works just fine from psql and
> returns all my lovely rows just as I want them.

If 'param' is limited to only one or two values, the path of least
resistance is to create a view in your database and then treat it like
any other source in DBIx::Class.

Otherwise, you'll have to try 'from' attr hackery.  See:

http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultSet.pm#from

-- 
Daniel Westermann-Clark



More information about the Dbix-class mailing list