WHERE-clause filtering for dynamic anonymous views
[prev]
[thread]
[next]
[Date index for 2004/07/16]
I haven't done anything about this, and I'm just floating the idea to see if
it's sane, (and to make sure I don't forget it) but...
I think it might be useful to have a plug-in which remembers additional
WHERE clauses to tag onto a request, to narrow down the scope of any searching
or updates.
For instance, suppose instead of a CD table, you have a Music table which
a "format" field - some records have format "CD", some have "12inch", and
so on. Then:
my $cds = Music->filter(format => "CD");
Now you can use $cds like a Class::DBI::Pager object:
$cds->retrieve_all;
will return you all the items with format of "CD".
I don't know if this will be feasible to implement with the current design of
Class::DBI, or whether it would be a good idea, but I can think of some uses
for it. (For instance, I know Jesse has tables with a "deleted" column that it
would be good to filter on.)
Thoughts?
--
VMS must die!
|
WHERE-clause filtering for dynamic anonymous views
Simon Cozens 09:36 on 16 Jul 2004
|