[Dbix-class] Twiddling SELECT lists and WHERE clauses

dorian taylor dorian.taylor.lists at gmail.com
Fri Sep 9 20:33:44 GMT 2011

Hey guys,

I have a set of queries that do virtually the same thing over three
different initial result sources. Elements of the WHERE clause are
present in each of them, but sometimes I need to refer to me.colname,
sometimes relname.colname. The same goes for the SELECT list.

My instinct is to do some sort of thing which reads the join structure
and figures out from the point of view of the initial position which
columns to rename 'me.' and which to rename 'relname.'. I figure
though that there must be some existing facility for at least part of
this. I see for example that there are +select and +as operators, as
well as the merging of WHERE clauses when searches on result sets are
called in succession. I suppose I could just fully qualify the
underlying table names rather than use the generated aliases, but I'm
concerned about side effects.



Dorian Taylor

More information about the DBIx-Class mailing list