[Dbix-class] Excluding columns from a query

fREW Schmidt frioux at gmail.com
Thu Feb 18 15:48:00 GMT 2010


On Thu, Feb 18, 2010 at 7:02 AM, BUCHMULLER Norbert <norbi.lists at nix.hu>wro=
te:

> On Wed, 17 Feb 2010 09:19:44 -0600 fREW Schmidt wrote:
>
> >    1. Only have the remove-columns affect the default select, since
> > having it affect an explicit columns list is a little silly.
> >    2. Having it affect the *current* select list; the use-case for this
> >    would be if you had an explicit columns list in previous search (or a
> >    predefined search more likely) and you wanted to take away a column
> > from that.
>
> I'd vote for #2 as it would make possible things like that (a variant of
> the use-case you mentioned):
>
>  $rs->method_that_adds_a_calculated_column->search(
>   ...
>   {
>      remove_columns =3D> ['big_text_column'],
>   }
>  );  # and still have the calculated column (added via "+columns")
>
> Also this behaviour is the less surprising: with #1 the behaviour of
> 'remove_columns' (or '-columns' or whatever it will be called)
> would depend on whether a given column comes from the result source or
> from a previous search() call.
>
> norbi
>

ok, I've heard from I think 4 people regarding this now and everyone is in
favor of #2.  I'll implement it soon (within a week hopefully.)

-- =

fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100218/7f4=
58b7c/attachment.htm


More information about the DBIx-Class mailing list