About filters in Core API

10 views
Skip to first unread message

Laurent-Walter Goix

unread,
Jan 25, 2013, 11:19:01 AM1/25/13
to OpenSocial and Gadgets Specification Discussion
Hello,

with reference to [1] the filter operations available to the various
OS services are currently mostly applicable to strings ("contains" /
"equals" / "startsWith" / "present"). Indeed we'd like to extend them
to dates and/or numbers to provide major flexibility.

As such i'd like to know whether this has been already addressed
earlier and/or if some implementations have enhanced this subset. As
use cases we'd like to express concepts like greater than (eg
filterOp=gt), lower than (e.g. "lt") and a range (e.g. "between"). For
the latter as we have to cope with a single parameter ("filterValue")
it could be mapped into an array string such as "[from,to]" where from
and to are ordered (sub)strings, numbers and/or (sub)dateTimes. as
usual the exact format of the value depends on the specific field to
be evaluated.

here are some examples:
- to filter all activities occurred between june and december 2012:
filterBy=updated&filterOp=between&filterValue=[201206,201212]
- to filter people whose age is > 21:
filterBy=age&filterOp=gt&filterValue=21

Do you envision these to be possibly in scope of 2.5.1 as i believe
this (or similar solutions) is of minor impact on the spec? if agreed
i could submit a patch.

cheers
walter

[1] http://opensocial-resources.googlecode.com/svn/spec/trunk/Core-API-Server.xml#Request-Parameter-FilterOp-Value
Reply all
Reply to author
Forward
0 new messages