On Tue, Jul 5, 2011 at 02:54, Dmitry Belyavsky <[email protected]> wrote: > Greetings! > > On Tue, Jul 5, 2011 at 10:47 AM, Marc Logghe <[email protected]> wrote: >> Hi, >>> >>> 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? >>> >> Did not test this. But you might call $rs->as_query which returns an array >> ref. The first element in that array is the SQL. You can fish out the order >> by using a regex or split. > > Yes, just now I do so. But I want to find more common way.
There are no simple introspection methods on a resultset. Every so often, someone asks for pieces of it, but no-one has actually worked on building it properly. Rob _______________________________________________ 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]
