Re: RFC: Operation Options API proposal



On Tue, 2011-03-29 at 13:43 +0000, Iago Toral wrote:
> > Uhm... I think I'm not getting what do you mean by "multi-valued
> > options".
> >
> > Do you mean setting for instance a filter with with ARTIST and
> ALBUM 
> > in
> > just one call?
> 
>  No. I mean being able to assign multiple values to the same option, 
>  whether you use one call or various for that is another topic. 

If by "option" you mean "filter-artist" or "filter-album", then I guess
we are going a bit beyond what we talked about.

For me, setting a "filter-artist" as ("Madonna", "Beyonce", "Lady Gaga")
multivalues it is like doing:

artist = "Madonna" OR artist = "Beyonce" OR artist = "Lady Gaga"

So basically we are introducing the "OR" operator. And to be honest, I'm
not sure if we want to do it, or if there are plugins out there that
supports it.

In any case, if we want to go with it, IMHO the best way is following
the approach I used for the ranged keys: adding an "IN" operator:

set_filter_in (artist, <list of possible values>)

Thus, a plugin could define if it supports this operator, and which keys
for.


	J.A.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]