[tracker-miners/wip/carlosg/tracker-3.0-api-breaks: 30/57] tracker: Make "tracker index -i" use LOAD syntax



commit 9f1fdbba5a4238504f59a073aa7b445409a2b52f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 24 11:10:10 2019 +0100

    tracker: Make "tracker index -i" use LOAD syntax
    
    This is the syntax available in order to load TTL files or
    other data.

 src/tracker/tracker-index.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/tracker/tracker-index.c b/src/tracker/tracker-index.c
index 3f36035be..253669e5c 100644
--- a/src/tracker/tracker-index.c
+++ b/src/tracker/tracker-index.c
@@ -201,13 +201,20 @@ import_turtle_files (void)
        for (p = filenames; *p; p++) {
                GError *error = NULL;
                GFile *file;
+               gchar *query, *uri;
 
                g_print ("%s:'%s'\n",
                         _("Importing Turtle file"),
                         *p);
 
                file = g_file_new_for_commandline_arg (*p);
-               tracker_sparql_connection_load (connection, file, NULL, &error);
+               uri = g_file_get_uri (file);
+               query = g_strdup_printf ("LOAD <%s>", uri);
+               tracker_sparql_connection_update (connection, query,
+                                                 G_PRIORITY_DEFAULT, NULL,
+                                                 &error);
+               g_free (query);
+               g_free (uri);
                g_object_unref (file);
 
                if (error) {


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