[Dbix-class] Excluding columns from a query
fREW Schmidt
frioux at gmail.com
Wed Feb 17 15:19:44 GMT 2010
Gah, I should have read this thread sooner! I am actually working on adding
such a feature to DBIC. Getting it to work is quite easy. Getting the
right semantics is hard. For instance, we've discussed this on IRC and
really there are two options:
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'm personally in favor of the former, mostly because it's the simplest to
explain, test, and implement, and really all this is is a shortcut anyway.
Honestly I've implemented this twice now, both ways, but we need to nail
down the semantics. Furthermore, I feel like implementing remove-select and
remove-as is needlessly complex. If someone provides a select/as just blow
it away with columns.
What do you guys think?
-- =
fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100217/e7c=
b1a44/attachment.htm
More information about the DBIx-Class
mailing list