Greetings!

On Tue, Jul 5, 2011 at 3:24 AM, Eden Cardim <[email protected]> wrote:
>>>>>> "Dmitry" == Dmitry Belyavsky <[email protected]> writes:
>
>    Dmitry> Hello!
>    Dmitry> I need to extract a complex ORDER BY clause from the resultset in a
>    Dmitry> string form. How can I do it (may be using internal methods of
>    Dmitry> DBIx::Class, I know it's bad idea).
>
> What's a "complex order by"? Can you provide code examples using both
> DBIC, and the equivalent SQL you're expecting to obtain?

Sorry, the word "complex" is misleading here.

I want to extract ORDER BY string from any resultset. I need it for
the hand-maded query with window functions.

So I want smth like

my $rs = $schema->resultset("Client")->search({name => 'Ivan'},
{order_by => 'created'});
my $order_str = $rs->_get_order_by_any_way();

How can I get it?

Thank you!

-- 
SY, Dmitry Belyavsky

_______________________________________________
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/[email protected]

Reply via email to