Hello all, First a question:
What is the best way to support relative date queries in XESAM? For example, in Banshee people will have smart playlists such as "songs not played in the last 2 hours." This is turned into a SQL query similar to "LastPlayed < now() - 7200". The user query language form of this would ideally be "played < 2 hours ago", but what of the XML? What do you think of an optional 'relative' attribute on the date value specifying the seconds to add to the date, and allowing 'now' as a valid date? <lessThan> <field name="lastplayed" /> <date relative="-7200">now</date> </lessThan> Now the announcement: In Banshee we recently rewrote our query code and tried to make it compatible with XESAM. It includes two parsers (user query language and XML) and methods to produce user query language, XML, and SQL. The code is here: http://svn.gnome.org/viewvc/banshee/trunk/banshee/src/Core/Hyena/Hyena.Data.Query/ It's in a namespace/assembly that is not specific to Banshee, so Mono/.Net-based apps should be able to reuse it easily. The user query language is very similar to XESAM's, but also allows | and comma for or, NOT for -, and ()'s for grouping/nesting. We have some preliminary documentation up at: http://banshee-project.org/OnePointEx/Search Regards, Gabriel _______________________________________________ Xesam mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xesam
