[Dbix-class] Column aliases and the ambiguity of 'as'
Andrew Bramble
andrew.bramble at omnilab.com.au
Thu Jul 6 03:08:37 CEST 2006
On Thursday 06 July 2006 01:46, Matt S Trout wrote:
> Don't worry about this until the refactored query generator lands in the
> subselect branch, too many dragons.
Yup m found em. the comments about SQL::Abstract::Limit in there are quite
exciting.
> Try having => \"IFNULL(MIN(rights.permit,0))" etc.
Works for the simple case, in a situation where those values are tested many
times in 'having' it turns messy very fast , plus I am unsure that a DBD
would do any optimizing of the fact that
HAVING ( IFNULL(MIN(rights.permit,0)) > 0 ) OR
( IFNULL(MIN(rights.permit,0)) = 0 AND
IFNULL(MIN(inherited_rights.permit,0)) = 1 )
uses the same invocation of functions on rights.permit twice
Thanks for your suggestion , I'll await with eager anticipation the refactored
parts.
AB
More information about the Dbix-class
mailing list