Re: [PATCH 1/2] tracker: Rewrite SPARQL sentences
- From: Lionel Landwerlin <lionel g landwerlin linux intel com>
- To: grilo-list gnome org
- Subject: Re: [PATCH 1/2] tracker: Rewrite SPARQL sentences
- Date: Fri, 21 Jan 2011 18:41:10 +0000
Ok great, easier to debug :)
On Fri, 2011-01-21 at 17:03 +0100, Juan A. Suarez Romero wrote:
> Rewrite the pre-defined SPARQL sentence to reduce the size, as they have
> a lot of blanks.
>
> Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
> ---
> src/tracker/grl-tracker.c | 50 +++++++++++++++++++++++---------------------
> 1 files changed, 26 insertions(+), 24 deletions(-)
>
> diff --git a/src/tracker/grl-tracker.c b/src/tracker/grl-tracker.c
> index 01402d3..186bafd 100644
> --- a/src/tracker/grl-tracker.c
> +++ b/src/tracker/grl-tracker.c
> @@ -69,30 +69,32 @@ enum {
>
> /* --- Other --- */
>
> -#define TRACKER_SEARCH_REQUEST " \
> - SELECT rdf:type(?urn) %s \
> - WHERE { \
> - { ?urn a nfo:Media } . \
> - ?urn tracker:available ?tr . \
> - ?urn fts:match '%s' . \
> - } \
> - ORDER BY DESC(nfo:fileLastModified(?urn)) \
> - OFFSET %i LIMIT %i"
> -
> -#define TRACKER_BROWSE_CATEGORY_REQUEST " \
> - SELECT rdf:type(?urn) %s \
> - WHERE { \
> - ?urn a %s . \
> - ?urn tracker:available ?tr . \
> - } \
> - ORDER BY DESC(nfo:fileLastModified(?urn)) \
> - OFFSET %i LIMIT %i"
> -
> -#define TRACKER_METADATA_REQUEST " \
> - SELECT %s \
> - WHERE { \
> - ?urn nie:isStoredAs <%s> \
> - }"
> +#define TRACKER_SEARCH_REQUEST \
> + "SELECT rdf:type(?urn) %s " \
> + "WHERE " \
> + "{ " \
> + "?urn a nfo:Media . " \
> + "?urn tracker:available ?tr . " \
> + "?urn fts:match '%s' . " \
> + "} " \
> + "ORDER BY DESC(nfo:fileLastModified(?urn)) " \
> + "OFFSET %i " \
> + "LIMIT %i"
> +
> +#define TRACKER_BROWSE_CATEGORY_REQUEST \
> + "SELECT rdf:type(?urn) %s " \
> + "WHERE " \
> + "{ " \
> + "?urn a %s . " \
> + "?urn tracker:available ?tr . " \
> + "} " \
> + "ORDER BY DESC(nfo:fileLastModified(?urn)) " \
> + "OFFSET %i " \
> + "LIMIT %i"
> +
> +#define TRACKER_METADATA_REQUEST \
> + "SELECT %s " \
> + "WHERE { ?urn nie:isStoredAs <%s> }" \
>
> typedef struct {
> GrlKeyID grl_key;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]