[tracker/miner-fs-queries-performance: 5/6] TrackerSparqlExpression: add tracker:uri-is-parent/descendant() sparql functions.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-queries-performance: 5/6] TrackerSparqlExpression: add tracker:uri-is-parent/descendant() sparql functions.
- Date: Thu, 22 Apr 2010 08:53:22 +0000 (UTC)
commit 92f3b641382eef10b61c3da70c21a1359b202432
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]