[tracker/wip/carlosg/anonymous-nodes: 23/24] libtracker-sparql: Add enum value for anonymous bnodes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/anonymous-nodes: 23/24] libtracker-sparql: Add enum value for anonymous bnodes
- Date: Fri, 8 Oct 2021 09:40:56 +0000 (UTC)
commit c154592feabb4ebd15e724c169c852e2e9d39bb1
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 12 15:28:57 2021 +0200
libtracker-sparql: Add enum value for anonymous bnodes
This is a default behavior of SPARQL that we deviate from. Add a
new TrackerSparqlConnectionFlags value that will be used to honor this.
src/libtracker-sparql/direct/tracker-direct.c | 2 ++
src/libtracker-sparql/tracker-connection.h | 3 +++
2 files changed, 5 insertions(+)
---
diff --git a/src/libtracker-sparql/direct/tracker-direct.c b/src/libtracker-sparql/direct/tracker-direct.c
index cf9f1167a..a4a69d44c 100644
--- a/src/libtracker-sparql/direct/tracker-direct.c
+++ b/src/libtracker-sparql/direct/tracker-direct.c
@@ -332,6 +332,8 @@ translate_flags (TrackerSparqlConnectionFlags flags)
db_flags |= TRACKER_DB_MANAGER_FTS_ENABLE_STOP_WORDS;
if ((flags & TRACKER_SPARQL_CONNECTION_FLAGS_FTS_IGNORE_NUMBERS) != 0)
db_flags |= TRACKER_DB_MANAGER_FTS_IGNORE_NUMBERS;
+ if ((flags & TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES) != 0)
+ db_flags |= TRACKER_DB_MANAGER_ANONYMOUS_BNODES;
return db_flags;
}
diff --git a/src/libtracker-sparql/tracker-connection.h b/src/libtracker-sparql/tracker-connection.h
index e8969860f..4a05b280f 100644
--- a/src/libtracker-sparql/tracker-connection.h
+++ b/src/libtracker-sparql/tracker-connection.h
@@ -39,6 +39,8 @@ G_BEGIN_DECLS
* @TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_UNACCENT: Unaccenting is applied to FTS search terms.
* @TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_STOP_WORDS: FTS Search terms are filtered through a stop word
list.
* @TRACKER_SPARQL_CONNECTION_FLAGS_FTS_IGNORE_NUMBERS: Ignore numbers in FTS search terms.
+ * @TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES: Treat blank nodes as specified in
+ * SPARQL 1.1 syntax. Namely, they cannot be used as URIs. This flag is available since Tracker 3.3.
*
* Connection flags to modify #TrackerSparqlConnection behavior.
*/
@@ -49,6 +51,7 @@ typedef enum {
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_UNACCENT = 1 << 2,
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_STOP_WORDS = 1 << 3,
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_IGNORE_NUMBERS = 1 << 4,
+ TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES = 1 << 5,
} TrackerSparqlConnectionFlags;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]