Re: Operation options (filtering, sorting and more)



El mar, 15-03-2011 a las 17:07 +0100, Juan A. Suárez Romero escribió:
> On Tue, 2011-03-15 at 16:43 +0100, Iago Toral Quiroga wrote:
> > 
> > Also, to see what this API would be good for, I am dropping a few
> > random
> > examples of filters here and I would like you to tell which ones would
> > be achievable with this API and which ones would not (and example of
> > how
> > the API would be used to define the filter if it is supported would be
> > cool too!)
> > 
> > a) Artist = X
> > b) Duration > X
> > c) Date > X
> > d) Artist = X AND Date > Y
> > e) Artist = X AND Album = Y AND Genre = Z
> > f) Artist = X AND Duration > Y AND Date < Z
> > g) Artist = X AND Genre = Y AND Type = Audio
> > h) Artist = X AND Genre = Y AND (Type = Audio OR Type = Video)
> > i) Artist = X OR Artist = Y
> > j) (Artist = X OR Artist = Y) AND (Album = Z OR Album = Q) 
> 
> 
> As example, in the work I did only (a), (e) and (g) cases are allowed.
> 
> Rationale is:
> 
> - We agreed that only the '=' operation will be allowed

Notice that even though I proposed that I did mention that we should
support ranged dates :). There I was using things like this:

min-date = X and max-date = Y 

so I only use the '=' operator from the API POV, but I am actually doing
a < AND > comparison in the end. I think we need to cover this case (and
maybe others) because it fits in what I would call "basic filters". And
I mean the date filter case, not just any ranged filter like bitrate > X
or something like that. Maybe duration could be interesting too, not
sure.

But notice that the tricky part here is how we define "min-date" and
"max-date" since they are not metadata keys and how we tailor the API to
to work with these special concepts.

Iago



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