[tracker/wip/carlosg/sparql-parser-ng: 20/56] libtracker-data: Implement MINUS
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql-parser-ng: 20/56] libtracker-data: Implement MINUS
- Date: Tue, 13 Nov 2018 10:21:33 +0000 (UTC)
commit 58b399e302423ed9a65cb6b184f7a7b652bc0531
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 6 00:48:27 2018 +0200
libtracker-data: Implement MINUS
Use the equivalent EXCEPT sqlite syntax.
src/libtracker-data/tracker-sparql.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index ad0c756bc..1015a0a92 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -3073,7 +3073,12 @@ translate_MinusGraphPattern (TrackerSparql *sparql,
{
/* MinusGraphPattern ::= 'MINUS' GroupGraphPattern
*/
- _unimplemented ("MINUS");
+ _expect (sparql, RULE_TYPE_LITERAL, LITERAL_MINUS);
+ _prepend_string (sparql, "SELECT * FROM (");
+ _append_string (sparql, ") EXCEPT ");
+ _call_rule (sparql, NAMED_RULE_GroupGraphPattern, error);
+
+ return TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]