[tracker/wip/carlosg/sparql1.1: 29/80] libtracker-data: Implement STRUUID/UUID sparql functions



commit 6678f6ed58c01a114bca56ad1deced0849747c12
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jun 4 13:23:08 2019 +0200

    libtracker-data: Implement STRUUID/UUID sparql functions

 src/libtracker-data/tracker-sparql.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index 47818473e..d13456207 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -6076,10 +6076,12 @@ translate_BuiltInCall (TrackerSparql  *sparql,
                sparql->current_state.expression_type = TRACKER_PROPERTY_TYPE_DATETIME;
        } else if (_accept (sparql, RULE_TYPE_LITERAL, LITERAL_UUID)) {
                _expect (sparql, RULE_TYPE_TERMINAL, TERMINAL_TYPE_NIL);
-               _unimplemented ("UUID");
+               _append_string (sparql, "SparqlUUID() ");
+               sparql->current_state.expression_type = TRACKER_PROPERTY_TYPE_STRING;
        } else if (_accept (sparql, RULE_TYPE_LITERAL, LITERAL_STRUUID)) {
                _expect (sparql, RULE_TYPE_TERMINAL, TERMINAL_TYPE_NIL);
-               _unimplemented ("STRUUID");
+               _append_string (sparql, "SUBSTR(SparqlUUID(), 10) ");
+               sparql->current_state.expression_type = TRACKER_PROPERTY_TYPE_STRING;
        } else if (_accept (sparql, RULE_TYPE_LITERAL, LITERAL_CONCAT)) {
                sparql->current_state.convert_to_string = TRUE;
                old_sep = tracker_sparql_swap_current_expression_list_separator (sparql, " || ");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]