[PATCH 1/2] tracker: Rewrite SPARQL sentences
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 1/2] tracker: Rewrite SPARQL sentences
- Date: Fri, 21 Jan 2011 17:03:44 +0100
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;
--
1.7.3.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]