Got it, I will try that. On Sunday, June 28, 2020 at 7:24:26 PM UTC+3, Jeremy Evans wrote: > > On Sunday, June 28, 2020 at 7:23:01 AM UTC-7, Aryk Grosz wrote: >> >> I think what you are saying is that basically you need to qualify columns >> if you think Dataset#qualify will happen later in the chain and you don't >> want it to change the current columns... >> >> Sorry for the bad example, by "computed" I mean simply any computed >> column like COUNT(*) as "count", doesn't really matter. >> > > Dataset#qualify shouldn't affect that. It doesn't qualify function names > (which can be qualified) or aliases (which can't). I think from your > earlier example, it is qualifying the identifier in ORDER. You can either > repeat the computed value in order: > > x = <computer> > User.select(x.as(:is_nearby)).order(x).qualify > > or use a numbered order: > > User.select(<computed>.as(:is_nearby)).order(1).qualify > > Thanks, > Jeremy >
-- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/977f060d-0708-471e-962e-16b423a34d14o%40googlegroups.com.
