[tracker/wip/carlosg/sparql-parser-ng: 11/43] libtracker-data: Implement MINUS
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/sparql-parser-ng: 11/43] libtracker-data: Implement MINUS
- Date: Sat, 3 Nov 2018 13:08:27 +0000 (UTC)
commit ac335e06246670c990f6ebb0c5ba178f4b9c7dde
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]