in reply to SQL function from DBIC

I think you can do something like:
my $results = $resultset->search( {}, { 'select' => 'enum_range(typename)', 'as' => 'enumerate', }, ); while (my $result = $results->next) { print $result->get_column('enumerate'); }
Caution: Code not tested as I do not have postgres, but I did something similar in MySQL (applying a function to a combination of columns) and it worked then.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: SQL function from DBIC
by Sixtease (Friar) on Dec 07, 2008 at 18:59 UTC

    Yeehaw! Works, man. And without defining a result_source. :^)) Thanks a lot. *bows*

    use strict; use warnings; print "Just Another Perl Hacker\n";