[tracker/wip/carlosg/sparql-parser-ng: 306/306] libtracker-sparql-backend: Expose direct connection's query_statement()



commit 7aea88d52f5119dc125a144d95d65746b244bde8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Oct 15 23:12:36 2018 +0200

    libtracker-sparql-backend: Expose direct connection's query_statement()
    
    This should eventually be implemented in the bus backend as well, but not
    yet.

 src/libtracker-sparql-backend/tracker-backend.vala | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/libtracker-sparql-backend/tracker-backend.vala 
b/src/libtracker-sparql-backend/tracker-backend.vala
index 7768d5f07..d99ceb291 100644
--- a/src/libtracker-sparql-backend/tracker-backend.vala
+++ b/src/libtracker-sparql-backend/tracker-backend.vala
@@ -81,6 +81,16 @@ class Tracker.Sparql.Backend : Connection {
                }
        }
 
+       public override Statement? query_statement (string sparql, Cancellable? cancellable = null) throws 
Sparql.Error {
+               debug ("%s(): '%s'", GLib.Log.METHOD, sparql);
+               if (direct != null) {
+                       return direct.query_statement (sparql, cancellable);
+               } else {
+                       warning ("Interface 'query_statement' not implemented on dbus interface");
+                       return null;
+               }
+       }
+
        public override void update (string sparql, int priority = GLib.Priority.DEFAULT, Cancellable? 
cancellable = null) throws Sparql.Error, IOError, DBusError, GLib.Error {
                debug ("%s(priority:%d): '%s'", GLib.Log.METHOD, priority, sparql);
                if (bus == null) {


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