[tracker] TrackerSparqlExpression: add tracker:uri-is-parent/descendant() sparql functions.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] TrackerSparqlExpression: add tracker:uri-is-parent/descendant() sparql functions.
- Date: Thu, 22 Apr 2010 14:26:06 +0000 (UTC)
commit 293d97957c4ee629f01757b2c3019230373c4d73
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Apr 21 15:38:06 2010 +0200
TrackerSparqlExpression: add tracker:uri-is-parent/descendant() sparql functions.
src/libtracker-data/tracker-sparql-expression.vala | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala
index 31f6f1c..853babc 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -623,6 +623,26 @@ class Tracker.Sparql.Expression : Object {
sql.append (")");
return PropertyType.STRING;
+ } else if (uri == TRACKER_NS + "uri-is-parent") {
+ sql.append ("SparqlUriIsParent(");
+ translate_expression_as_string (sql);
+ sql.append (", ");
+ expect (SparqlTokenType.COMMA);
+
+ translate_expression_as_string (sql);
+ sql.append (")");
+
+ return PropertyType.BOOLEAN;
+ } else if (uri == TRACKER_NS + "uri-is-descendant") {
+ sql.append ("SparqlUriIsDescendant(");
+ translate_expression_as_string (sql);
+ sql.append (", ");
+ expect (SparqlTokenType.COMMA);
+
+ translate_expression_as_string (sql);
+ sql.append (")");
+
+ return PropertyType.BOOLEAN;
} else if (uri == TRACKER_NS + "string-from-filename") {
sql.append ("SparqlStringFromFilename(");
translate_expression_as_string (sql);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]