Re: Operation options (filtering, sorting and more)



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
- Only AND operator will be allowed.

For other more complex tasks, query() is the appropriate operator.


Note that I still thinks we should keep with the preconditions you
explained (only "=" and "AND" operators), because it makes things
easier, both for Grilo and, specially, for plugin developers.

Right now, in the work I did, plugins just tell the list of keys they
support for filtering, as well as what kind of media they can filter. No
need to specify if they support AND or OR, or if they support the ">"
operator and for which keys.


	J.A.




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