On 08/03/13 14:18 Peter Rabbitson wrote:
> On Fri, Mar 08, 2013 at 02:05:19PM +0000, Robert Rothenberg wrote:
>>
> ...
>
>> This worked. Then, for reasons I don't understand, stopped working.
> 
> Could you recall what you did when it stopped working? Upgrade or anything?

Oh sorry. I added the order_by (which I thought was in there, but wasn't),
and then it stopped working.

>> So how do I specify the 'as' attribute for bound functions?
> 
> What you have above is a literal chunk of SQL - stuff that will be passed
> to the RDBMS directly. Simply change
> 
>   'ST_Distance(me.location,ST_GeomFromText(?, 27700))'
> to
>   'ST_Distance(me.location,ST_GeomFromText(?, 27700)) AS 
> distance_from_location'

Thanks.

> Though I still would like to find out how that ever worked.

It worked as far as the column name being inflated as expected.

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/dbix-class@lists.scsys.co.uk

Reply via email to