[tracker/wip/carlosg/serialize-api: 3/26] libtracker-data: Convert blank nodes in DESCRIBE queries
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/serialize-api: 3/26] libtracker-data: Convert blank nodes in DESCRIBE queries
- Date: Sun, 19 Dec 2021 10:35:01 +0000 (UTC)
commit 6b396dcf889c99b09388c95762c520b31d8cfd7d
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 13 01:49:42 2021 +0100
libtracker-data: Convert blank nodes in DESCRIBE queries
This was missed in the conversion to anonymous blank nodes. The
blank node label should be returned as the subject in these queries.
src/libtracker-data/tracker-sparql.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index 0761a4773..756ca07bf 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -3367,7 +3367,7 @@ translate_DescribeQuery (TrackerSparql *sparql,
_expect (sparql, RULE_TYPE_LITERAL, LITERAL_DESCRIBE);
_append_string (sparql,
"SELECT "
- " (SELECT Uri FROM Resource WHERE ID = subject),"
+ " COALESCE((SELECT Uri FROM Resource WHERE ID = subject), 'urn:bnode:' || subject),"
" (SELECT Uri FROM Resource WHERE ID = predicate),"
" object "
"FROM tracker_triples ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]