[tracker/parser] SPARQL: Support unary minus
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/parser] SPARQL: Support unary minus
- Date: Wed, 12 Aug 2009 11:03:32 +0000 (UTC)
commit 1a7aed5279c7ec512c27b5b207517fdc8039d06f
Author: Jürg Billeter <j bitron ch>
Date: Wed Aug 12 13:02:45 2009 +0200
SPARQL: Support unary minus
src/libtracker-data/tracker-sparql-query.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index c610e1f..9f093ba 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -1214,6 +1214,14 @@ public class Tracker.SparqlQuery : Object {
translate_primary_expression (sql);
sql.append (")");
return;
+ } else if (accept (SparqlTokenType.PLUS)) {
+ translate_primary_expression (sql);
+ return;
+ } else if (accept (SparqlTokenType.MINUS)) {
+ sql.append ("-(");
+ translate_primary_expression (sql);
+ sql.append (")");
+ return;
}
translate_primary_expression (sql);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]