TrackerSparqlConnection
TrackerSparqlConnection is an object that represents a connection to a SPARQL triple store. This store may be local and private (see tracker_sparql_connection_new), or it may be a remote connection to a public endpoint (See tracker_sparql_connection_bus_new and tracker_sparql_connection_remote_new).
A TrackerSparqlConnection is private to the calling process, it can be exposed publicly via a TrackerEndpoint, see tracker_endpoint_dbus_new.
Updates on a connection are performed via the tracker_sparql_connection_update family of calls. tracker_sparql_connection_update_array may be used for batched updates. All functions have asynchronous variants.
Queries on a connection are performed via tracker_sparql_connection_query and tracker_sparql_connection_query_statement. The first call receives a query string and returns a TrackerSparqlCursor to iterate the results. The second call returns a TrackerSparqlStatement object that may be reused for repeatable queries with variable parameters. tracker_sparql_statement_execute will returns a TrackerSparqlCursor.
Depending on the ontology definition, TrackerSparqlConnection may emit notifications whenever changes happen in the stored data. These notifications can be processed via a TrackerNotifier obtained with tracker_sparql_connection_create_notifier.
After use, a TrackerSparqlConnection should be closed. See tracker_sparql_connection_close and tracker_sparql_connection_close_async.
A TrackerSparqlConnection may be used from multiple threads, asynchronous database updates are executed sequentially on arrival order, asynchronous queries are executed in a thread pool.
TrackerSparqlConnection
GObject ╰──TrackerSparqlConnection
The
Members
parent_instance
(GObject)
–
Class structure
TrackerSparqlConnectionClass
Tracker.SparqlConnectionClass
Tracker.SparqlConnectionClass
Tracker.SparqlConnection
GObject.Object ╰──Tracker.SparqlConnection
The
Members
parent_instance
(GObject.Object)
–
Tracker.SparqlConnection
GObject.Object ╰──Tracker.SparqlConnection
The
Members
parent_instance
(GObject.Object)
–
Constructors
tracker_sparql_connection_bus_new
TrackerSparqlConnection * tracker_sparql_connection_bus_new (const gchar * service_name, const gchar * object_path, GDBusConnection * dbus_connection, GError ** error)
Connects to a database owned by another process on the local machine.
Parameters:
service_name
–
The name of the D-Bus service to connect to.
object_path
(
[nullable])
–
The path to the object, or NULL to use the default.
dbus_connection
(
[nullable])
–
The GDBusConnection to use, or NULL to use the session bus
error
–
pointer to a GError
a new TrackerSparqlConnection. Call g_object_unref on the object when no longer used.
Since : 3.0
Tracker.SparqlConnection.prototype.bus_new
function Tracker.SparqlConnection.prototype.bus_new(service_name: String, object_path: String, dbus_connection: Gio.DBusConnection): {
// javascript wrapper for 'tracker_sparql_connection_bus_new'
}
Connects to a database owned by another process on the local machine.
Parameters:
The name of the D-Bus service to connect to.
The Gio.DBusConnection to use, or null to use the session bus
a new Tracker.SparqlConnection. Call GObject.Object.prototype.unref on the object when no longer used.
Since : 3.0
Tracker.SparqlConnection.bus_new
@raises(GLib.GError)
def Tracker.SparqlConnection.bus_new (service_name, object_path, dbus_connection):
#python wrapper for 'tracker_sparql_connection_bus_new'
Connects to a database owned by another process on the local machine.
Parameters:
The name of the D-Bus service to connect to.
The Gio.DBusConnection to use, or None to use the session bus
a new Tracker.SparqlConnection. Call GObject.Object.unref on the object when no longer used.
Since : 3.0
tracker_sparql_connection_bus_new_finish
TrackerSparqlConnection * tracker_sparql_connection_bus_new_finish (GAsyncResult * result, GError ** error)
Completion function for tracker_sparql_connection_bus_new_async.
a new TrackerSparqlConnection. Call g_object_unref on the object when no longer used.
Since : 3.1
Tracker.SparqlConnection.prototype.bus_new_finish
function Tracker.SparqlConnection.prototype.bus_new_finish(result: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_bus_new_finish'
}
Completion function for Tracker.SparqlConnection.prototype.bus_new_async.
Parameters:
the Gio.AsyncResult
a new Tracker.SparqlConnection. Call GObject.Object.prototype.unref on the object when no longer used.
Since : 3.1
Tracker.SparqlConnection.bus_new_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.bus_new_finish (result):
#python wrapper for 'tracker_sparql_connection_bus_new_finish'
Completion function for Tracker.SparqlConnection.bus_new_async.
Parameters:
the Gio.AsyncResult
a new Tracker.SparqlConnection. Call GObject.Object.unref on the object when no longer used.
Since : 3.1
tracker_sparql_connection_new
TrackerSparqlConnection * tracker_sparql_connection_new (TrackerSparqlConnectionFlags flags, GFile * store, GFile * ontology, GCancellable * cancellable, GError ** error)
Creates or opens a database.
This method should only be used for databases owned by the current process. To connect to databases managed by other processes, use tracker_sparql_connection_bus_new.
If store is NULL, the database will be created in memory.
The ontologies parameter must point to a location containing suitable
.ontology
files in Turtle format. These control the database schema that
is used. You can use the default Nepomuk ontologies by calling
tracker_sparql_get_ontology_nepomuk ().
If you open an existing database using a different ontology to the one it was created with, Tracker will attempt to migrate the existing data to the new schema. This may raise an error. In particular, not all migrations are possible without causing data loss and Tracker will refuse to delete data during a migration.
You can also pass NULL for ontologies to mean "use the ontologies that the database was created with". This will fail if the database doesn't already exist.
Parameters:
flags
–
values from TrackerSparqlConnectionFlags
cancellable
(
[nullable])
–
a GCancellable, or NULL
error
–
pointer to a GError
a new TrackerSparqlConnection. Call g_object_unref on the object when no longer used.
Since : 3.0
Tracker.SparqlConnection.prototype.new
function Tracker.SparqlConnection.prototype.new(flags: Tracker.SparqlConnectionFlags, store: Gio.File, ontology: Gio.File, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_new'
}
Creates or opens a database.
This method should only be used for databases owned by the current process. To connect to databases managed by other processes, use Tracker.SparqlConnection.prototype.bus_new.
If store is null, the database will be created in memory.
The ontologies parameter must point to a location containing suitable
.ontology
files in Turtle format. These control the database schema that
is used. You can use the default Nepomuk ontologies by calling
tracker_sparql_get_ontology_nepomuk ().
If you open an existing database using a different ontology to the one it was created with, Tracker will attempt to migrate the existing data to the new schema. This may raise an error. In particular, not all migrations are possible without causing data loss and Tracker will refuse to delete data during a migration.
You can also pass null for ontologies to mean "use the ontologies that the database was created with". This will fail if the database doesn't already exist.
a new Tracker.SparqlConnection. Call GObject.Object.prototype.unref on the object when no longer used.
Since : 3.0
Tracker.SparqlConnection.new
@raises(GLib.GError)
def Tracker.SparqlConnection.new (flags, store, ontology, cancellable):
#python wrapper for 'tracker_sparql_connection_new'
Creates or opens a database.
This method should only be used for databases owned by the current process. To connect to databases managed by other processes, use Tracker.SparqlConnection.bus_new.
If store is None, the database will be created in memory.
The ontologies parameter must point to a location containing suitable
.ontology
files in Turtle format. These control the database schema that
is used. You can use the default Nepomuk ontologies by calling
tracker_sparql_get_ontology_nepomuk ().
If you open an existing database using a different ontology to the one it was created with, Tracker will attempt to migrate the existing data to the new schema. This may raise an error. In particular, not all migrations are possible without causing data loss and Tracker will refuse to delete data during a migration.
You can also pass None for ontologies to mean "use the ontologies that the database was created with". This will fail if the database doesn't already exist.
a new Tracker.SparqlConnection. Call GObject.Object.unref on the object when no longer used.
Since : 3.0
tracker_sparql_connection_new_finish
TrackerSparqlConnection * tracker_sparql_connection_new_finish (GAsyncResult * result, GError ** error)
Completion function for tracker_sparql_connection_new_async.
Since : 3.0
Tracker.SparqlConnection.prototype.new_finish
function Tracker.SparqlConnection.prototype.new_finish(result: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_new_finish'
}
Completion function for Tracker.SparqlConnection.prototype.new_async.
Parameters:
the Gio.AsyncResult
Since : 3.0
Tracker.SparqlConnection.new_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.new_finish (result):
#python wrapper for 'tracker_sparql_connection_new_finish'
Completion function for Tracker.SparqlConnection.new_async.
Parameters:
the Gio.AsyncResult
Since : 3.0
tracker_sparql_connection_remote_new
TrackerSparqlConnection * tracker_sparql_connection_remote_new (const gchar * uri_base)
Connects to a remote SPARQL endpoint. The connection is made using the libsoup HTTP library. The connection will normally use the http:// or https:// protocol.
Parameters:
uri_base
–
Base URI of the remote connection
a new remote TrackerSparqlConnection. Call g_object_unref on the object when no longer used.
Tracker.SparqlConnection.prototype.remote_new
function Tracker.SparqlConnection.prototype.remote_new(uri_base: String): {
// javascript wrapper for 'tracker_sparql_connection_remote_new'
}
Connects to a remote SPARQL endpoint. The connection is made using the libsoup HTTP library. The connection will normally use the http:// or https:// protocol.
Parameters:
Base URI of the remote connection
a new remote Tracker.SparqlConnection. Call GObject.Object.prototype.unref on the object when no longer used.
Tracker.SparqlConnection.remote_new
def Tracker.SparqlConnection.remote_new (uri_base):
#python wrapper for 'tracker_sparql_connection_remote_new'
Connects to a remote SPARQL endpoint. The connection is made using the libsoup HTTP library. The connection will normally use the http:// or https:// protocol.
Parameters:
Base URI of the remote connection
a new remote Tracker.SparqlConnection. Call GObject.Object.unref on the object when no longer used.
Methods
tracker_sparql_connection_close
tracker_sparql_connection_close (TrackerSparqlConnection * connection)
Closes a SPARQL connection. No other API calls than g_object_unref should happen after this call.
This call is blocking. All pending updates will be flushed, and the store databases will be closed orderly. All ongoing SELECT queries will be cancelled. Notifiers will no longer emit events.
Parameters:
connection
–
Since : 3.0
Tracker.SparqlConnection.prototype.close
function Tracker.SparqlConnection.prototype.close(): {
// javascript wrapper for 'tracker_sparql_connection_close'
}
Closes a SPARQL connection. No other API calls than GObject.Object.prototype.unref should happen after this call.
This call is blocking. All pending updates will be flushed, and the store databases will be closed orderly. All ongoing SELECT queries will be cancelled. Notifiers will no longer emit events.
Parameters:
Since : 3.0
Tracker.SparqlConnection.close
def Tracker.SparqlConnection.close (self):
#python wrapper for 'tracker_sparql_connection_close'
Closes a SPARQL connection. No other API calls than GObject.Object.unref should happen after this call.
This call is blocking. All pending updates will be flushed, and the store databases will be closed orderly. All ongoing SELECT queries will be cancelled. Notifiers will no longer emit events.
Parameters:
Since : 3.0
tracker_sparql_connection_close_async
tracker_sparql_connection_close_async (TrackerSparqlConnection * connection, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Closes a connection asynchronously. No other API calls than g_object_unref should happen after this call. See tracker_sparql_connection_close for more information.
Parameters:
connection
–
cancellable
–
a GCancellable, or NULL
callback
–
user-defined GAsyncReadyCallback to be called when asynchronous operation is finished.
user_data
–
user-defined data to be passed to callback
Since : 3.0
Tracker.SparqlConnection.prototype.close_async
function Tracker.SparqlConnection.prototype.close_async(cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_close_async'
}
Closes a connection asynchronously. No other API calls than GObject.Object.prototype.unref should happen after this call. See Tracker.SparqlConnection.prototype.close for more information.
Parameters:
a Gio.Cancellable, or null
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
Since : 3.0
Tracker.SparqlConnection.close_async
def Tracker.SparqlConnection.close_async (self, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_close_async'
Closes a connection asynchronously. No other API calls than GObject.Object.unref should happen after this call. See Tracker.SparqlConnection.close for more information.
Parameters:
a Gio.Cancellable, or None
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
Since : 3.0
tracker_sparql_connection_close_finish
gboolean tracker_sparql_connection_close_finish (TrackerSparqlConnection * connection, GAsyncResult * res, GError ** error)
Finishes the asynchronous connection close.
Since : 3.0
Tracker.SparqlConnection.prototype.close_finish
function Tracker.SparqlConnection.prototype.close_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_close_finish'
}
Finishes the asynchronous connection close.
Since : 3.0
Tracker.SparqlConnection.close_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.close_finish (self, res):
#python wrapper for 'tracker_sparql_connection_close_finish'
Finishes the asynchronous connection close.
Since : 3.0
tracker_sparql_connection_create_batch
TrackerBatch * tracker_sparql_connection_create_batch (TrackerSparqlConnection * connection)
Creates a new batch to store and execute update commands. If the connection is readonly or cannot issue SPARQL updates, NULL will be returned.
Parameters:
connection
–
(nullable): A new TrackerBatch
Tracker.SparqlConnection.prototype.create_batch
function Tracker.SparqlConnection.prototype.create_batch(): {
// javascript wrapper for 'tracker_sparql_connection_create_batch'
}
Creates a new batch to store and execute update commands. If the connection is readonly or cannot issue SPARQL updates, null will be returned.
Parameters:
(nullable): A new Tracker.Batch
Tracker.SparqlConnection.create_batch
def Tracker.SparqlConnection.create_batch (self):
#python wrapper for 'tracker_sparql_connection_create_batch'
Creates a new batch to store and execute update commands. If the connection is readonly or cannot issue SPARQL updates, None will be returned.
Parameters:
(nullable): A new Tracker.Batch
tracker_sparql_connection_create_notifier
TrackerNotifier * tracker_sparql_connection_create_notifier (TrackerSparqlConnection * connection)
Creates a new TrackerNotifier to notify about changes in connection. See TrackerNotifier documentation for information about how to use this object.
Parameters:
connection
–
a newly created notifier. Free with g_object_unref when no longer needed.
Tracker.SparqlConnection.prototype.create_notifier
function Tracker.SparqlConnection.prototype.create_notifier(): {
// javascript wrapper for 'tracker_sparql_connection_create_notifier'
}
Creates a new Tracker.Notifier to notify about changes in connection. See Tracker.Notifier documentation for information about how to use this object.
Parameters:
a newly created notifier. Free with GObject.Object.prototype.unref when no longer needed.
Tracker.SparqlConnection.create_notifier
def Tracker.SparqlConnection.create_notifier (self):
#python wrapper for 'tracker_sparql_connection_create_notifier'
Creates a new Tracker.Notifier to notify about changes in connection. See Tracker.Notifier documentation for information about how to use this object.
Parameters:
a newly created notifier. Free with GObject.Object.unref when no longer needed.
tracker_sparql_connection_deserialize_async
tracker_sparql_connection_deserialize_async (TrackerSparqlConnection * connection, TrackerDeserializeFlags flags, TrackerRdfFormat format, const gchar * default_graph, GInputStream * stream, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Incorporates the contents of the RDF data contained in stream into the data stored by connection. This is an asynchronous operation, callback will be invoked when the data has been fully inserted to connection.
RDF data will be inserted in the given default_graph if one is provided,
or the default graph if default_graph is NULL. Any RDF data that has a
graph specified (e.g. using the GRAPH
clause in the Trig format) will
be inserted in the specified graph instead of default_graph.
The flags argument is reserved for future expansions, currently TRACKER_DESERIALIZE_FLAGS_NONE must be passed.
Parameters:
connection
–
flags
–
deserialization flags
format
–
RDF format of data in stream
default_graph
–
default graph that will receive the RDF data
stream
–
input stream with RDF data
cancellable
–
callback
–
the GAsyncReadyCallback called when the operation completes
user_data
–
data passed to callback
Since : 3.4
Tracker.SparqlConnection.prototype.deserialize_async
function Tracker.SparqlConnection.prototype.deserialize_async(flags: Tracker.DeserializeFlags, format: Tracker.RdfFormat, default_graph: String, stream: Gio.InputStream, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_deserialize_async'
}
Incorporates the contents of the RDF data contained in stream into the data stored by connection. This is an asynchronous operation, callback will be invoked when the data has been fully inserted to connection.
RDF data will be inserted in the given default_graph if one is provided,
or the default graph if default_graph is null. Any RDF data that has a
graph specified (e.g. using the GRAPH
clause in the Trig format) will
be inserted in the specified graph instead of default_graph.
The flags argument is reserved for future expansions, currently Tracker.DeserializeFlags.DESERIALIZE_FLAGS_NONE must be passed.
Parameters:
deserialization flags
RDF format of data in stream
default graph that will receive the RDF data
input stream with RDF data
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.4
Tracker.SparqlConnection.deserialize_async
def Tracker.SparqlConnection.deserialize_async (self, flags, format, default_graph, stream, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_deserialize_async'
Incorporates the contents of the RDF data contained in stream into the data stored by connection. This is an asynchronous operation, callback will be invoked when the data has been fully inserted to connection.
RDF data will be inserted in the given default_graph if one is provided,
or the default graph if default_graph is None. Any RDF data that has a
graph specified (e.g. using the GRAPH
clause in the Trig format) will
be inserted in the specified graph instead of default_graph.
The flags argument is reserved for future expansions, currently Tracker.DeserializeFlags.DESERIALIZE_FLAGS_NONE must be passed.
Parameters:
deserialization flags
RDF format of data in stream
default graph that will receive the RDF data
input stream with RDF data
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.4
tracker_sparql_connection_deserialize_finish
gboolean tracker_sparql_connection_deserialize_finish (TrackerSparqlConnection * connection, GAsyncResult * result, GError ** error)
Finishes a tracker_sparql_connection_deserialize_async operation. In case of error, NULL will be returned and error will be set.
TRUE if all data was inserted successfully.
Since : 3.4
Tracker.SparqlConnection.prototype.deserialize_finish
function Tracker.SparqlConnection.prototype.deserialize_finish(result: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_deserialize_finish'
}
Finishes a Tracker.SparqlConnection.prototype.deserialize_async operation. In case of error, null will be returned and error will be set.
Since : 3.4
Tracker.SparqlConnection.deserialize_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.deserialize_finish (self, result):
#python wrapper for 'tracker_sparql_connection_deserialize_finish'
Finishes a Tracker.SparqlConnection.deserialize_async operation. In case of error, None will be returned and error will be set.
Since : 3.4
tracker_sparql_connection_get_namespace_manager
TrackerNamespaceManager * tracker_sparql_connection_get_namespace_manager (TrackerSparqlConnection * connection)
Retrieves a TrackerNamespaceManager that contains all prefixes in the ontology of connection.
Parameters:
connection
–
a TrackerNamespaceManager for this connection. This object is owned by connection and must not be freed.
Tracker.SparqlConnection.prototype.get_namespace_manager
function Tracker.SparqlConnection.prototype.get_namespace_manager(): {
// javascript wrapper for 'tracker_sparql_connection_get_namespace_manager'
}
Retrieves a Tracker.NamespaceManager that contains all prefixes in the ontology of connection.
Parameters:
a Tracker.NamespaceManager for this connection. This object is owned by connection and must not be freed.
Tracker.SparqlConnection.get_namespace_manager
def Tracker.SparqlConnection.get_namespace_manager (self):
#python wrapper for 'tracker_sparql_connection_get_namespace_manager'
Retrieves a Tracker.NamespaceManager that contains all prefixes in the ontology of connection.
Parameters:
a Tracker.NamespaceManager for this connection. This object is owned by connection and must not be freed.
tracker_sparql_connection_load_statement_from_gresource
TrackerSparqlStatement * tracker_sparql_connection_load_statement_from_gresource (TrackerSparqlConnection * connection, const gchar * resource_path, GCancellable * cancellable, GError ** error)
Prepares a TrackerSparqlStatement for the SPARQL query contained as a resource file at resource_path. SPARQL Query files typically have the .rq extension.
Parameters:
connection
–
resource_path
–
the resource path of the file to parse.
cancellable
–
a GCancellable, or NULL
error
–
return location for an error, or NULL
a prepared statement
Since : 3.3
Tracker.SparqlConnection.prototype.load_statement_from_gresource
function Tracker.SparqlConnection.prototype.load_statement_from_gresource(resource_path: String, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_load_statement_from_gresource'
}
Prepares a Tracker.SparqlStatement for the SPARQL query contained as a resource file at resource_path. SPARQL Query files typically have the .rq extension.
a prepared statement
Since : 3.3
Tracker.SparqlConnection.load_statement_from_gresource
@raises(GLib.GError)
def Tracker.SparqlConnection.load_statement_from_gresource (self, resource_path, cancellable):
#python wrapper for 'tracker_sparql_connection_load_statement_from_gresource'
Prepares a Tracker.SparqlStatement for the SPARQL query contained as a resource file at resource_path. SPARQL Query files typically have the .rq extension.
a prepared statement
Since : 3.3
tracker_sparql_connection_map_connection
tracker_sparql_connection_map_connection (TrackerSparqlConnection * connection, const gchar * handle_name, TrackerSparqlConnection * service_connection)
Maps service_connection so it is available as a "private:@handle_name" URI in connection. This can be accessed via the SERVICE SPARQL syntax in queries from connection. E.g.:
SELECT ?u {
SERVICE <private:other-connection> {
?u a rdfs:Resource
}
}
This is useful to interrelate data from multiple TrackerSparqlConnection instances maintained by the same process, without creating a public endpoint for service_connection.
connection may only be a TrackerSparqlConnection created via tracker_sparql_connection_new and tracker_sparql_connection_new_async.
Parameters:
connection
–
handle_name
–
handle name for service_connection
service_connection
–
a TrackerSparqlConnection to use from connection
Since : 3.3
Tracker.SparqlConnection.prototype.map_connection
function Tracker.SparqlConnection.prototype.map_connection(handle_name: String, service_connection: Tracker.SparqlConnection): {
// javascript wrapper for 'tracker_sparql_connection_map_connection'
}
Maps service_connection so it is available as a "private:@handle_name" URI in connection. This can be accessed via the SERVICE SPARQL syntax in queries from connection. E.g.:
SELECT ?u {
SERVICE <private:other-connection> {
?u a rdfs:Resource
}
}
This is useful to interrelate data from multiple Tracker.SparqlConnection instances maintained by the same process, without creating a public endpoint for service_connection.
connection may only be a Tracker.SparqlConnection created via Tracker.SparqlConnection.prototype.new and Tracker.SparqlConnection.prototype.new_async.
Since : 3.3
Tracker.SparqlConnection.map_connection
def Tracker.SparqlConnection.map_connection (self, handle_name, service_connection):
#python wrapper for 'tracker_sparql_connection_map_connection'
Maps service_connection so it is available as a "private:@handle_name" URI in connection. This can be accessed via the SERVICE SPARQL syntax in queries from connection. E.g.:
SELECT ?u {
SERVICE <private:other-connection> {
?u a rdfs:Resource
}
}
This is useful to interrelate data from multiple Tracker.SparqlConnection instances maintained by the same process, without creating a public endpoint for service_connection.
connection may only be a Tracker.SparqlConnection created via Tracker.SparqlConnection.new and Tracker.SparqlConnection.new_async.
Since : 3.3
tracker_sparql_connection_query
TrackerSparqlCursor * tracker_sparql_connection_query (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GError ** error)
Executes a SPARQL query on. The API call is completely synchronous, so it may block.
The sparql query should be built with TrackerResource, or its parts correctly escaped using tracker_sparql_escape_string, otherwise SPARQL injection is possible.
Parameters:
connection
–
sparql
–
string containing the SPARQL query
cancellable
–
a GCancellable used to cancel the operation
error
–
GError for error reporting.
a TrackerSparqlCursor if results were found. On error, NULL is returned and the error is set accordingly. Call g_object_unref on the returned cursor when no longer needed.
Tracker.SparqlConnection.prototype.query
function Tracker.SparqlConnection.prototype.query(sparql: String, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_query'
}
Executes a SPARQL query on. The API call is completely synchronous, so it may block.
The sparql query should be built with Tracker.Resource, or its parts correctly escaped using Tracker.prototype.sparql_escape_string, otherwise SPARQL injection is possible.
a Tracker.SparqlCursor if results were found. On error, null is returned and the error is set accordingly. Call GObject.Object.prototype.unref on the returned cursor when no longer needed.
Tracker.SparqlConnection.query
@raises(GLib.GError)
def Tracker.SparqlConnection.query (self, sparql, cancellable):
#python wrapper for 'tracker_sparql_connection_query'
Executes a SPARQL query on. The API call is completely synchronous, so it may block.
The sparql query should be built with Tracker.Resource, or its parts correctly escaped using Tracker.sparql_escape_string, otherwise SPARQL injection is possible.
a Tracker.SparqlCursor if results were found. On error, None is returned and the error is set accordingly. Call GObject.Object.unref on the returned cursor when no longer needed.
tracker_sparql_connection_query_async
tracker_sparql_connection_query_async (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Executes asynchronously a SPARQL query.
Parameters:
connection
–
sparql
–
string containing the SPARQL query
cancellable
–
a GCancellable used to cancel the operation
callback
–
user-defined GAsyncReadyCallback to be called when asynchronous operation is finished.
user_data
–
user-defined data to be passed to callback
Tracker.SparqlConnection.prototype.query_async
function Tracker.SparqlConnection.prototype.query_async(sparql: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_query_async'
}
Executes asynchronously a SPARQL query.
Parameters:
string containing the SPARQL query
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
Tracker.SparqlConnection.query_async
def Tracker.SparqlConnection.query_async (self, sparql, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_query_async'
Executes asynchronously a SPARQL query.
Parameters:
string containing the SPARQL query
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
tracker_sparql_connection_query_finish
TrackerSparqlCursor * tracker_sparql_connection_query_finish (TrackerSparqlConnection * connection, GAsyncResult * res, GError ** error)
Finishes the asynchronous SPARQL query operation.
Parameters:
connection
–
res
–
a GAsyncResult with the result of the operation
error
–
GError for error reporting.
a TrackerSparqlCursor if results were found. On error, NULL is returned and the error is set accordingly. Call g_object_unref on the returned cursor when no longer needed.
Tracker.SparqlConnection.prototype.query_finish
function Tracker.SparqlConnection.prototype.query_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_query_finish'
}
Finishes the asynchronous SPARQL query operation.
a Tracker.SparqlCursor if results were found. On error, null is returned and the error is set accordingly. Call GObject.Object.prototype.unref on the returned cursor when no longer needed.
Tracker.SparqlConnection.query_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.query_finish (self, res):
#python wrapper for 'tracker_sparql_connection_query_finish'
Finishes the asynchronous SPARQL query operation.
a Tracker.SparqlCursor if results were found. On error, None is returned and the error is set accordingly. Call GObject.Object.unref on the returned cursor when no longer needed.
tracker_sparql_connection_query_statement
TrackerSparqlStatement * tracker_sparql_connection_query_statement (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GError ** error)
Prepares the given SELECT/DESCRIBE/CONSTRUCT sparql as a TrackerSparqlStatement. This prepared statement can be executed through tracker_sparql_statement_execute or tracker_sparql_statement_serialize_async families of functions.
Parameters:
connection
–
sparql
–
the SPARQL query
cancellable
–
a GCancellable used to cancel the operation, or NULL
error
–
a TrackerSparqlError or NULL if no error occured
a prepared statement
Tracker.SparqlConnection.prototype.query_statement
function Tracker.SparqlConnection.prototype.query_statement(sparql: String, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_query_statement'
}
Prepares the given SELECT/DESCRIBE/CONSTRUCT sparql as a Tracker.SparqlStatement. This prepared statement can be executed through Tracker.SparqlStatement.prototype.execute or Tracker.SparqlStatement.prototype.serialize_async families of functions.
a prepared statement
Tracker.SparqlConnection.query_statement
@raises(GLib.GError)
def Tracker.SparqlConnection.query_statement (self, sparql, cancellable):
#python wrapper for 'tracker_sparql_connection_query_statement'
Prepares the given SELECT/DESCRIBE/CONSTRUCT sparql as a Tracker.SparqlStatement. This prepared statement can be executed through Tracker.SparqlStatement.execute or Tracker.SparqlStatement.serialize_async families of functions.
a prepared statement
tracker_sparql_connection_serialize_async
tracker_sparql_connection_serialize_async (TrackerSparqlConnection * connection, TrackerSerializeFlags flags, TrackerRdfFormat format, const gchar * query, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Serializes data into the specified RDF format. query must be either a
DESCRIBE
or CONSTRUCT
query. This is an asynchronous operation,
callback will be invoked when the data is available for reading.
The SPARQL endpoint may not support the specified format, in that case an error will be raised.
The flags argument is reserved for future expansions, currently TRACKER_SERIALIZE_FLAGS_NONE must be passed.
Parameters:
connection
–
flags
–
serialization flags
format
–
output RDF format
query
–
SPARQL query
cancellable
–
callback
–
the GAsyncReadyCallback called when the operation completes
user_data
–
data passed to callback
Since : 3.3
Tracker.SparqlConnection.prototype.serialize_async
function Tracker.SparqlConnection.prototype.serialize_async(flags: Tracker.SerializeFlags, format: Tracker.RdfFormat, query: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_serialize_async'
}
Serializes data into the specified RDF format. query must be either a
DESCRIBE
or CONSTRUCT
query. This is an asynchronous operation,
callback will be invoked when the data is available for reading.
The SPARQL endpoint may not support the specified format, in that case an error will be raised.
The flags argument is reserved for future expansions, currently Tracker.SerializeFlags.SERIALIZE_FLAGS_NONE must be passed.
Parameters:
serialization flags
output RDF format
SPARQL query
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.3
Tracker.SparqlConnection.serialize_async
def Tracker.SparqlConnection.serialize_async (self, flags, format, query, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_serialize_async'
Serializes data into the specified RDF format. query must be either a
DESCRIBE
or CONSTRUCT
query. This is an asynchronous operation,
callback will be invoked when the data is available for reading.
The SPARQL endpoint may not support the specified format, in that case an error will be raised.
The flags argument is reserved for future expansions, currently Tracker.SerializeFlags.SERIALIZE_FLAGS_NONE must be passed.
Parameters:
serialization flags
output RDF format
SPARQL query
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.3
tracker_sparql_connection_serialize_finish
GInputStream * tracker_sparql_connection_serialize_finish (TrackerSparqlConnection * connection, GAsyncResult * result, GError ** error)
Finishes a tracker_sparql_connection_serialize_async operation. In case of error, NULL will be returned and error will be set.
a GInputStream to read RDF content.
Since : 3.3
Tracker.SparqlConnection.prototype.serialize_finish
function Tracker.SparqlConnection.prototype.serialize_finish(result: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_serialize_finish'
}
Finishes a Tracker.SparqlConnection.prototype.serialize_async operation. In case of error, null will be returned and error will be set.
a Gio.InputStream to read RDF content.
Since : 3.3
Tracker.SparqlConnection.serialize_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.serialize_finish (self, result):
#python wrapper for 'tracker_sparql_connection_serialize_finish'
Finishes a Tracker.SparqlConnection.serialize_async operation. In case of error, None will be returned and error will be set.
a Gio.InputStream to read RDF content.
Since : 3.3
tracker_sparql_connection_update
tracker_sparql_connection_update (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GError ** error)
Executes a SPARQL update. The API call is completely synchronous, so it may block.
The sparql query should be built with TrackerResource, or its parts correctly escaped using tracker_sparql_escape_string, otherwise SPARQL injection is possible.
Parameters:
connection
–
sparql
–
string containing the SPARQL update query
cancellable
–
a GCancellable used to cancel the operation
error
–
GError for error reporting.
Tracker.SparqlConnection.prototype.update
function Tracker.SparqlConnection.prototype.update(sparql: String, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_update'
}
Executes a SPARQL update. The API call is completely synchronous, so it may block.
The sparql query should be built with Tracker.Resource, or its parts correctly escaped using Tracker.prototype.sparql_escape_string, otherwise SPARQL injection is possible.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
Tracker.SparqlConnection.update
@raises(GLib.GError)
def Tracker.SparqlConnection.update (self, sparql, cancellable):
#python wrapper for 'tracker_sparql_connection_update'
Executes a SPARQL update. The API call is completely synchronous, so it may block.
The sparql query should be built with Tracker.Resource, or its parts correctly escaped using Tracker.sparql_escape_string, otherwise SPARQL injection is possible.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
tracker_sparql_connection_update_array_async
tracker_sparql_connection_update_array_async (TrackerSparqlConnection * connection, gchar ** sparql, gint sparql_length, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Executes asynchronously an array of SPARQL updates. All updates in the array are handled within a single transaction.
Parameters:
connection
–
sparql
–
an array of strings containing the SPARQL update queries
sparql_length
–
the amount of strings you pass as sparql
cancellable
–
a GCancellable used to cancel the operation
callback
–
user-defined GAsyncReadyCallback to be called when asynchronous operation is finished.
user_data
–
user-defined data to be passed to callback
Tracker.SparqlConnection.prototype.update_array_async
function Tracker.SparqlConnection.prototype.update_array_async(sparql: String, sparql_length: Number, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_update_array_async'
}
Executes asynchronously an array of SPARQL updates. All updates in the array are handled within a single transaction.
Parameters:
an array of strings containing the SPARQL update queries
the amount of strings you pass as sparql
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
Tracker.SparqlConnection.update_array_async
def Tracker.SparqlConnection.update_array_async (self, sparql, sparql_length, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_update_array_async'
Executes asynchronously an array of SPARQL updates. All updates in the array are handled within a single transaction.
Parameters:
an array of strings containing the SPARQL update queries
the amount of strings you pass as sparql
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
tracker_sparql_connection_update_array_finish
gboolean tracker_sparql_connection_update_array_finish (TrackerSparqlConnection * connection, GAsyncResult * res, GError ** error)
Finishes the asynchronous SPARQL update_array operation.
Parameters:
connection
–
res
–
a GAsyncResult with the result of the operation
error
–
GError for error reporting.
TRUE if there were no errors.
Tracker.SparqlConnection.prototype.update_array_finish
function Tracker.SparqlConnection.prototype.update_array_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_update_array_finish'
}
Finishes the asynchronous SPARQL update_array operation.
Tracker.SparqlConnection.update_array_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.update_array_finish (self, res):
#python wrapper for 'tracker_sparql_connection_update_array_finish'
Finishes the asynchronous SPARQL update_array operation.
tracker_sparql_connection_update_async
tracker_sparql_connection_update_async (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Executes asynchronously a SPARQL update.
Parameters:
connection
–
sparql
–
string containing the SPARQL update query
cancellable
–
a GCancellable used to cancel the operation
callback
–
user-defined GAsyncReadyCallback to be called when asynchronous operation is finished.
user_data
–
user-defined data to be passed to callback
Tracker.SparqlConnection.prototype.update_async
function Tracker.SparqlConnection.prototype.update_async(sparql: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_update_async'
}
Executes asynchronously a SPARQL update.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
Tracker.SparqlConnection.update_async
def Tracker.SparqlConnection.update_async (self, sparql, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_update_async'
Executes asynchronously a SPARQL update.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
tracker_sparql_connection_update_blank
GVariant * tracker_sparql_connection_update_blank (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GError ** error)
Executes a SPARQL update and returns the URNs of the generated nodes, if any. The API call is completely synchronous, so it may block.
The sparql query should be built with TrackerResource, or its parts correctly escaped using tracker_sparql_escape_string, otherwise SPARQL injection is possible.
The format string of the GVariant
is aaa{ss}
(an array of an array
of dictionaries). The first array represents each INSERT that may exist in
the SPARQL string. The second array represents each new node for a given
WHERE clause. The last array holds a string pair with the blank node name
(e.g. foo
for the blank node _:foo
) and the URN that was generated for
it. For most updates the first two outer arrays will only contain one item.
Parameters:
connection
–
sparql
–
string containing the SPARQL update query
cancellable
–
a GCancellable used to cancel the operation
error
–
GError for error reporting.
a GVariant with the generated URNs, which should be freed with g_variant_unref when no longer used.
deprecated : 3.5: This function makes the expectation that blank nodes have a durable name that persist. The SPARQL and RDF specs define a much more reduced scope for blank node labels. This function advises a behavior that goes against that reduced scope, and will directly make the returned values meaningless if the %TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES flag is defined in the connection. Users that want names generated for them, should look for other methods (e.g. IRIs containing UUIDv4 strings).
Tracker.SparqlConnection.prototype.update_blank
function Tracker.SparqlConnection.prototype.update_blank(sparql: String, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_update_blank'
}
Executes a SPARQL update and returns the URNs of the generated nodes, if any. The API call is completely synchronous, so it may block.
The sparql query should be built with Tracker.Resource, or its parts correctly escaped using Tracker.prototype.sparql_escape_string, otherwise SPARQL injection is possible.
The format string of the GVariant
is aaa{ss}
(an array of an array
of dictionaries). The first array represents each INSERT that may exist in
the SPARQL string. The second array represents each new node for a given
WHERE clause. The last array holds a string pair with the blank node name
(e.g. foo
for the blank node _:foo
) and the URN that was generated for
it. For most updates the first two outer arrays will only contain one item.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
a GLib.Variant with the generated URNs, which should be freed with GLib.Variant.prototype.unref when no longer used.
deprecated : 3.5: This function makes the expectation that blank nodes have a durable name that persist. The SPARQL and RDF specs define a much more reduced scope for blank node labels. This function advises a behavior that goes against that reduced scope, and will directly make the returned values meaningless if the %TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES flag is defined in the connection. Users that want names generated for them, should look for other methods (e.g. IRIs containing UUIDv4 strings).
Tracker.SparqlConnection.update_blank
@raises(GLib.GError)
def Tracker.SparqlConnection.update_blank (self, sparql, cancellable):
#python wrapper for 'tracker_sparql_connection_update_blank'
Executes a SPARQL update and returns the URNs of the generated nodes, if any. The API call is completely synchronous, so it may block.
The sparql query should be built with Tracker.Resource, or its parts correctly escaped using Tracker.sparql_escape_string, otherwise SPARQL injection is possible.
The format string of the GVariant
is aaa{ss}
(an array of an array
of dictionaries). The first array represents each INSERT that may exist in
the SPARQL string. The second array represents each new node for a given
WHERE clause. The last array holds a string pair with the blank node name
(e.g. foo
for the blank node _:foo
) and the URN that was generated for
it. For most updates the first two outer arrays will only contain one item.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
a GLib.Variant with the generated URNs, which should be freed with GLib.Variant.unref when no longer used.
deprecated : 3.5: This function makes the expectation that blank nodes have a durable name that persist. The SPARQL and RDF specs define a much more reduced scope for blank node labels. This function advises a behavior that goes against that reduced scope, and will directly make the returned values meaningless if the %TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES flag is defined in the connection. Users that want names generated for them, should look for other methods (e.g. IRIs containing UUIDv4 strings).
tracker_sparql_connection_update_blank_async
tracker_sparql_connection_update_blank_async (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Executes asynchronously a SPARQL update with blank nodes. See the tracker_sparql_connection_update_blank documentation to see the differences with tracker_sparql_connection_update.
Parameters:
connection
–
sparql
–
string containing the SPARQL update query
cancellable
–
a GCancellable used to cancel the operation
callback
–
user-defined GAsyncReadyCallback to be called when asynchronous operation is finished.
user_data
–
user-defined data to be passed to callback
deprecated : 3.5: See tracker_sparql_connection_update_blank().
Tracker.SparqlConnection.prototype.update_blank_async
function Tracker.SparqlConnection.prototype.update_blank_async(sparql: String, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_update_blank_async'
}
Executes asynchronously a SPARQL update with blank nodes. See the Tracker.SparqlConnection.prototype.update_blank documentation to see the differences with Tracker.SparqlConnection.prototype.update.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
deprecated : 3.5: See tracker_sparql_connection_update_blank().
Tracker.SparqlConnection.update_blank_async
def Tracker.SparqlConnection.update_blank_async (self, sparql, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_update_blank_async'
Executes asynchronously a SPARQL update with blank nodes. See the Tracker.SparqlConnection.update_blank documentation to see the differences with Tracker.SparqlConnection.update.
Parameters:
string containing the SPARQL update query
a Gio.Cancellable used to cancel the operation
user-defined Gio.AsyncReadyCallback to be called when asynchronous operation is finished.
user-defined data to be passed to callback
deprecated : 3.5: See tracker_sparql_connection_update_blank().
tracker_sparql_connection_update_blank_finish
GVariant * tracker_sparql_connection_update_blank_finish (TrackerSparqlConnection * connection, GAsyncResult * res, GError ** error)
Finishes the asynchronous SPARQL update operation, and returns the URNs of the generated nodes, if any. See the tracker_sparql_connection_update_blank documentation for the interpretation of the returned GVariant.
Parameters:
connection
–
res
–
a GAsyncResult with the result of the operation
error
–
GError for error reporting.
a GVariant with the generated URNs, which should be freed with g_variant_unref when no longer used.
deprecated : 3.5: See tracker_sparql_connection_update_blank().
Tracker.SparqlConnection.prototype.update_blank_finish
function Tracker.SparqlConnection.prototype.update_blank_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_update_blank_finish'
}
Finishes the asynchronous SPARQL update operation, and returns the URNs of the generated nodes, if any. See the Tracker.SparqlConnection.prototype.update_blank documentation for the interpretation of the returned GLib.Variant.
a GLib.Variant with the generated URNs, which should be freed with GLib.Variant.prototype.unref when no longer used.
deprecated : 3.5: See tracker_sparql_connection_update_blank().
Tracker.SparqlConnection.update_blank_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.update_blank_finish (self, res):
#python wrapper for 'tracker_sparql_connection_update_blank_finish'
Finishes the asynchronous SPARQL update operation, and returns the URNs of the generated nodes, if any. See the Tracker.SparqlConnection.update_blank documentation for the interpretation of the returned GLib.Variant.
a GLib.Variant with the generated URNs, which should be freed with GLib.Variant.unref when no longer used.
deprecated : 3.5: See tracker_sparql_connection_update_blank().
tracker_sparql_connection_update_finish
tracker_sparql_connection_update_finish (TrackerSparqlConnection * connection, GAsyncResult * res, GError ** error)
Finishes the asynchronous SPARQL update operation.
Parameters:
connection
–
res
–
a GAsyncResult with the result of the operation
error
–
GError for error reporting.
Tracker.SparqlConnection.prototype.update_finish
function Tracker.SparqlConnection.prototype.update_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_update_finish'
}
Finishes the asynchronous SPARQL update operation.
Tracker.SparqlConnection.update_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.update_finish (self, res):
#python wrapper for 'tracker_sparql_connection_update_finish'
Finishes the asynchronous SPARQL update operation.
tracker_sparql_connection_update_resource
gboolean tracker_sparql_connection_update_resource (TrackerSparqlConnection * connection, const gchar * graph, TrackerResource * resource, GCancellable * cancellable, GError ** error)
Inserts a resource as described by resource, on the graph described by graph. This operation blocks until done.
Parameters:
connection
–
graph
(
[nullable])
–
RDF graph where the resource should be inserted/updated, or NULL for the default graph
resource
–
cancellable
(
[nullable])
–
a GCancellable, or NULL
TRUE if there were no errors.
Since : 3.1
Tracker.SparqlConnection.prototype.update_resource
function Tracker.SparqlConnection.prototype.update_resource(graph: String, resource: Tracker.Resource, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_update_resource'
}
Inserts a resource as described by resource, on the graph described by graph. This operation blocks until done.
Parameters:
RDF graph where the resource should be inserted/updated, or null for the default graph
a Gio.Cancellable, or null
Since : 3.1
Tracker.SparqlConnection.update_resource
@raises(GLib.GError)
def Tracker.SparqlConnection.update_resource (self, graph, resource, cancellable):
#python wrapper for 'tracker_sparql_connection_update_resource'
Inserts a resource as described by resource, on the graph described by graph. This operation blocks until done.
Parameters:
RDF graph where the resource should be inserted/updated, or None for the default graph
a Gio.Cancellable, or None
Since : 3.1
tracker_sparql_connection_update_resource_async
tracker_sparql_connection_update_resource_async (TrackerSparqlConnection * connection, const gchar * graph, TrackerResource * resource, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Inserts a resource as described by resource, on the graph described by graph. This operation is executed asynchronously, when finished callback will be executed.
Parameters:
connection
–
graph
(
[nullable])
–
RDF graph where the resource should be inserted/updated, or NULL for the default graph
resource
–
cancellable
(
[nullable])
–
a GCancellable, or NULL
callback
–
the GAsyncReadyCallback called when the operation completes
user_data
–
data passed to callback
Since : 3.1
Tracker.SparqlConnection.prototype.update_resource_async
function Tracker.SparqlConnection.prototype.update_resource_async(graph: String, resource: Tracker.Resource, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_update_resource_async'
}
Inserts a resource as described by resource, on the graph described by graph. This operation is executed asynchronously, when finished callback will be executed.
Parameters:
RDF graph where the resource should be inserted/updated, or null for the default graph
a Gio.Cancellable, or null
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.1
Tracker.SparqlConnection.update_resource_async
def Tracker.SparqlConnection.update_resource_async (self, graph, resource, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_update_resource_async'
Inserts a resource as described by resource, on the graph described by graph. This operation is executed asynchronously, when finished callback will be executed.
Parameters:
RDF graph where the resource should be inserted/updated, or None for the default graph
a Gio.Cancellable, or None
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.1
tracker_sparql_connection_update_resource_finish
gboolean tracker_sparql_connection_update_resource_finish (TrackerSparqlConnection * connection, GAsyncResult * res, GError ** error)
Finishes a tracker_sparql_connection_update_resource_async operation.
TRUE if there were no errors.
Since : 3.1
Tracker.SparqlConnection.prototype.update_resource_finish
function Tracker.SparqlConnection.prototype.update_resource_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_connection_update_resource_finish'
}
Finishes a Tracker.SparqlConnection.prototype.update_resource_async operation.
Since : 3.1
Tracker.SparqlConnection.update_resource_finish
@raises(GLib.GError)
def Tracker.SparqlConnection.update_resource_finish (self, res):
#python wrapper for 'tracker_sparql_connection_update_resource_finish'
Finishes a Tracker.SparqlConnection.update_resource_async operation.
Since : 3.1
tracker_sparql_connection_update_statement
TrackerSparqlStatement * tracker_sparql_connection_update_statement (TrackerSparqlConnection * connection, const gchar * sparql, GCancellable * cancellable, GError ** error)
Prepares the given INSERT/DELETE/LOAD/CLEAR/DROP/ADD/MOVE/COPY/CREATE sparql as a TrackerSparqlStatement. This prepared statement can be executed through the tracker_sparql_statement_update family of functions.
Parameters:
connection
–
sparql
–
the SPARQL update
cancellable
–
a GCancellable used to cancel the operation, or NULL
error
–
a TrackerSparqlError or NULL if no error occured
a prepared statement
Since : 3.5
Tracker.SparqlConnection.prototype.update_statement
function Tracker.SparqlConnection.prototype.update_statement(sparql: String, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_connection_update_statement'
}
Prepares the given INSERT/DELETE/LOAD/CLEAR/DROP/ADD/MOVE/COPY/CREATE sparql as a Tracker.SparqlStatement. This prepared statement can be executed through the Tracker.SparqlStatement.prototype.update family of functions.
a prepared statement
Since : 3.5
Tracker.SparqlConnection.update_statement
@raises(GLib.GError)
def Tracker.SparqlConnection.update_statement (self, sparql, cancellable):
#python wrapper for 'tracker_sparql_connection_update_statement'
Prepares the given INSERT/DELETE/LOAD/CLEAR/DROP/ADD/MOVE/COPY/CREATE sparql as a Tracker.SparqlStatement. This prepared statement can be executed through the Tracker.SparqlStatement.update family of functions.
a prepared statement
Since : 3.5
Functions
tracker_sparql_connection_bus_new_async
tracker_sparql_connection_bus_new_async (const gchar * service_name, const gchar * object_path, GDBusConnection * dbus_connection, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Connects to a database owned by another process on the local machine. This is an asynchronous operation.
Parameters:
service_name
–
The name of the D-Bus service to connect to.
object_path
(
[nullable])
–
The path to the object, or NULL to use the default.
dbus_connection
(
[nullable])
–
The GDBusConnection to use, or NULL to use the session bus
cancellable
(
[nullable])
–
a GCancellable, or NULL
callback
–
the GAsyncReadyCallback called when the operation completes
user_data
–
data passed to callback
Since : 3.1
Tracker.SparqlConnection.prototype.bus_new_async
function Tracker.SparqlConnection.prototype.bus_new_async(service_name: String, object_path: String, dbus_connection: Gio.DBusConnection, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_bus_new_async'
}
Connects to a database owned by another process on the local machine. This is an asynchronous operation.
Parameters:
The name of the D-Bus service to connect to.
The Gio.DBusConnection to use, or null to use the session bus
a Gio.Cancellable, or null
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.1
Tracker.SparqlConnection.bus_new_async
def Tracker.SparqlConnection.bus_new_async (service_name, object_path, dbus_connection, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_bus_new_async'
Connects to a database owned by another process on the local machine. This is an asynchronous operation.
Parameters:
The name of the D-Bus service to connect to.
The Gio.DBusConnection to use, or None to use the session bus
a Gio.Cancellable, or None
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.1
tracker_sparql_connection_new_async
tracker_sparql_connection_new_async (TrackerSparqlConnectionFlags flags, GFile * store, GFile * ontology, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Asynchronous version of tracker_sparql_connection_new.
Parameters:
flags
–
values from TrackerSparqlConnectionFlags
cancellable
(
[nullable])
–
a GCancellable, or NULL
callback
–
the GAsyncReadyCallback called when the operation completes
user_data
–
data passed to callback
Since : 3.0
Tracker.SparqlConnection.prototype.new_async
function Tracker.SparqlConnection.prototype.new_async(flags: Tracker.SparqlConnectionFlags, store: Gio.File, ontology: Gio.File, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_connection_new_async'
}
Asynchronous version of Tracker.SparqlConnection.prototype.new.
Parameters:
values from Tracker.SparqlConnectionFlags
a Gio.Cancellable, or null
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.0
Tracker.SparqlConnection.new_async
def Tracker.SparqlConnection.new_async (flags, store, ontology, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_connection_new_async'
Asynchronous version of Tracker.SparqlConnection.new.
Parameters:
values from Tracker.SparqlConnectionFlags
a Gio.Cancellable, or None
the Gio.AsyncReadyCallback called when the operation completes
data passed to callback
Since : 3.0
Enumerations
TrackerDeserializeFlags
Flags affecting deserialization of RDF.
Members
TRACKER_DESERIALIZE_FLAGS_NONE
(0)
–
No flags.
Tracker.DeserializeFlags
Flags affecting deserialization of RDF.
Members
Tracker.DeserializeFlags.DESERIALIZE_FLAGS_NONE
(0)
–
No flags.
Tracker.DeserializeFlags
Flags affecting deserialization of RDF.
Members
Tracker.DeserializeFlags.DESERIALIZE_FLAGS_NONE
(0)
–
No flags.
TrackerSerializeFlags
Members
TRACKER_SERIALIZE_FLAGS_NONE
(0)
–
Tracker.SerializeFlags
Members
Tracker.SerializeFlags.SERIALIZE_FLAGS_NONE
(0)
–
Tracker.SerializeFlags
Members
Tracker.SerializeFlags.SERIALIZE_FLAGS_NONE
(0)
–
TrackerSparqlConnectionFlags
Connection flags to modify TrackerSparqlConnection behavior.
Members
TRACKER_SPARQL_CONNECTION_FLAGS_NONE
(0)
–
No flags.
TRACKER_SPARQL_CONNECTION_FLAGS_READONLY
(1)
–
Connection is readonly.
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_STEMMER
(2)
–
Word stemming is applied to FTS search terms.
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_UNACCENT
(4)
–
Unaccenting is applied to FTS search terms.
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_STOP_WORDS
(8)
–
FTS Search terms are filtered through a stop word list.
TRACKER_SPARQL_CONNECTION_FLAGS_FTS_IGNORE_NUMBERS
(16)
–
Ignore numbers in FTS search terms.
TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES
(32)
–
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.
Tracker.SparqlConnectionFlags
Connection flags to modify Tracker.SparqlConnection behavior.
Members
Tracker.SparqlConnectionFlags.NONE
(0)
–
No flags.
Tracker.SparqlConnectionFlags.READONLY
(1)
–
Connection is readonly.
Tracker.SparqlConnectionFlags.FTS_ENABLE_STEMMER
(2)
–
Word stemming is applied to FTS search terms.
Tracker.SparqlConnectionFlags.FTS_ENABLE_UNACCENT
(4)
–
Unaccenting is applied to FTS search terms.
Tracker.SparqlConnectionFlags.FTS_ENABLE_STOP_WORDS
(8)
–
FTS Search terms are filtered through a stop word list.
Tracker.SparqlConnectionFlags.FTS_IGNORE_NUMBERS
(16)
–
Ignore numbers in FTS search terms.
Tracker.SparqlConnectionFlags.ANONYMOUS_BNODES
(32)
–
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.
Tracker.SparqlConnectionFlags
Connection flags to modify Tracker.SparqlConnection behavior.
Members
Tracker.SparqlConnectionFlags.NONE
(0)
–
No flags.
Tracker.SparqlConnectionFlags.READONLY
(1)
–
Connection is readonly.
Tracker.SparqlConnectionFlags.FTS_ENABLE_STEMMER
(2)
–
Word stemming is applied to FTS search terms.
Tracker.SparqlConnectionFlags.FTS_ENABLE_UNACCENT
(4)
–
Unaccenting is applied to FTS search terms.
Tracker.SparqlConnectionFlags.FTS_ENABLE_STOP_WORDS
(8)
–
FTS Search terms are filtered through a stop word list.
Tracker.SparqlConnectionFlags.FTS_IGNORE_NUMBERS
(16)
–
Ignore numbers in FTS search terms.
Tracker.SparqlConnectionFlags.ANONYMOUS_BNODES
(32)
–
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.
Constants
TRACKER_SPARQL_TYPE_CONNECTION
#define TRACKER_SPARQL_TYPE_CONNECTION TRACKER_TYPE_SPARQL_CONNECTION
TRACKER_TYPE_SPARQL_CONNECTION
#define TRACKER_TYPE_SPARQL_CONNECTION tracker_sparql_connection_get_type ()
The results of the search are