TrackerSparqlStatement
The
The argument bindings may be changed through tracker_sparql_statement_bind_int, tracker_sparql_statement_bind_boolean, tracker_sparql_statement_bind_double and tracker_sparql_statement_bind_string. Those functions receive a name argument corresponding for the variable name in the SPARQL query (eg. "var" for ~var) and a value to map the variable to.
Once all arguments have a value, the query may be executed through tracker_sparql_statement_execute or tracker_sparql_statement_execute_async.
It is possible to use a given TrackerSparqlStatement in other threads than the one it was created from. It must be however used from just one thread at any given time.
TrackerSparqlStatement
GObject ╰──TrackerSparqlStatement
The
Members
parent_instance
(GObject)
–
Class structure
TrackerSparqlStatementClass
Tracker.SparqlStatementClass
Tracker.SparqlStatementClass
Tracker.SparqlStatement
GObject.Object ╰──Tracker.SparqlStatement
The
Members
parent_instance
(GObject.Object)
–
Tracker.SparqlStatement
GObject.Object ╰──Tracker.SparqlStatement
The
Members
parent_instance
(GObject.Object)
–
Methods
tracker_sparql_statement_bind_boolean
tracker_sparql_statement_bind_boolean (TrackerSparqlStatement * stmt, const gchar * name, gboolean value)
Binds the boolean value to variable name.
Tracker.SparqlStatement.prototype.bind_boolean
function Tracker.SparqlStatement.prototype.bind_boolean(name: String, value: Number): {
// javascript wrapper for 'tracker_sparql_statement_bind_boolean'
}
Binds the boolean value to variable name.
Parameters:
variable name
value
Tracker.SparqlStatement.bind_boolean
def Tracker.SparqlStatement.bind_boolean (self, name, value):
#python wrapper for 'tracker_sparql_statement_bind_boolean'
Binds the boolean value to variable name.
Parameters:
variable name
value
tracker_sparql_statement_bind_datetime
tracker_sparql_statement_bind_datetime (TrackerSparqlStatement * stmt, const gchar * name, GDateTime * value)
Binds the GDateTime value to variable name.
Since : 3.2
Tracker.SparqlStatement.prototype.bind_datetime
function Tracker.SparqlStatement.prototype.bind_datetime(name: String, value: GLib.DateTime): {
// javascript wrapper for 'tracker_sparql_statement_bind_datetime'
}
Binds the GDateTime value to variable name.
Parameters:
variable name
value
Since : 3.2
Tracker.SparqlStatement.bind_datetime
def Tracker.SparqlStatement.bind_datetime (self, name, value):
#python wrapper for 'tracker_sparql_statement_bind_datetime'
Binds the GDateTime value to variable name.
Parameters:
variable name
value
Since : 3.2
tracker_sparql_statement_bind_double
tracker_sparql_statement_bind_double (TrackerSparqlStatement * stmt, const gchar * name, gdouble value)
Binds the double value to variable name.
Tracker.SparqlStatement.prototype.bind_double
function Tracker.SparqlStatement.prototype.bind_double(name: String, value: Number): {
// javascript wrapper for 'tracker_sparql_statement_bind_double'
}
Binds the double value to variable name.
Parameters:
variable name
value
Tracker.SparqlStatement.bind_double
def Tracker.SparqlStatement.bind_double (self, name, value):
#python wrapper for 'tracker_sparql_statement_bind_double'
Binds the double value to variable name.
Parameters:
variable name
value
tracker_sparql_statement_bind_int
tracker_sparql_statement_bind_int (TrackerSparqlStatement * stmt, const gchar * name, gint64 value)
Binds the integer value to variable name.
Tracker.SparqlStatement.prototype.bind_int
function Tracker.SparqlStatement.prototype.bind_int(name: String, value: Number): {
// javascript wrapper for 'tracker_sparql_statement_bind_int'
}
Binds the integer value to variable name.
Parameters:
variable name
value
Tracker.SparqlStatement.bind_int
def Tracker.SparqlStatement.bind_int (self, name, value):
#python wrapper for 'tracker_sparql_statement_bind_int'
Binds the integer value to variable name.
Parameters:
variable name
value
tracker_sparql_statement_bind_string
tracker_sparql_statement_bind_string (TrackerSparqlStatement * stmt, const gchar * name, const gchar * value)
Binds the string value to variable name.
Tracker.SparqlStatement.prototype.bind_string
function Tracker.SparqlStatement.prototype.bind_string(name: String, value: String): {
// javascript wrapper for 'tracker_sparql_statement_bind_string'
}
Binds the string value to variable name.
Parameters:
variable name
value
Tracker.SparqlStatement.bind_string
def Tracker.SparqlStatement.bind_string (self, name, value):
#python wrapper for 'tracker_sparql_statement_bind_string'
Binds the string value to variable name.
Parameters:
variable name
value
tracker_sparql_statement_clear_bindings
tracker_sparql_statement_clear_bindings (TrackerSparqlStatement * stmt)
Clears all boolean/string/integer/double bindings.
Parameters:
stmt
–
Since : 3.0
Tracker.SparqlStatement.prototype.clear_bindings
function Tracker.SparqlStatement.prototype.clear_bindings(): {
// javascript wrapper for 'tracker_sparql_statement_clear_bindings'
}
Clears all boolean/string/integer/double bindings.
Parameters:
Since : 3.0
Tracker.SparqlStatement.clear_bindings
def Tracker.SparqlStatement.clear_bindings (self):
#python wrapper for 'tracker_sparql_statement_clear_bindings'
Clears all boolean/string/integer/double bindings.
Parameters:
Since : 3.0
tracker_sparql_statement_execute
TrackerSparqlCursor * tracker_sparql_statement_execute (TrackerSparqlStatement * stmt, GCancellable * cancellable, GError ** error)
Executes the SPARQL query with the currently bound values.
This function should only be called on TrackerSparqlStatement objects obtained through tracker_sparql_connection_query_statement or SELECT/CONSTRUCT/DESCRIBE statements loaded through tracker_sparql_connection_load_statement_from_gresource.
Parameters:
stmt
–
cancellable
–
a GCancellable used to cancel the operation
error
–
GError for error reporting.
Tracker.SparqlStatement.prototype.execute
function Tracker.SparqlStatement.prototype.execute(cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_statement_execute'
}
Executes the SPARQL query with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.prototype.query_statement or SELECT/CONSTRUCT/DESCRIBE statements loaded through Tracker.SparqlConnection.prototype.load_statement_from_gresource.
Tracker.SparqlStatement.execute
@raises(GLib.GError)
def Tracker.SparqlStatement.execute (self, cancellable):
#python wrapper for 'tracker_sparql_statement_execute'
Executes the SPARQL query with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.query_statement or SELECT/CONSTRUCT/DESCRIBE statements loaded through Tracker.SparqlConnection.load_statement_from_gresource.
tracker_sparql_statement_execute_async
tracker_sparql_statement_execute_async (TrackerSparqlStatement * stmt, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Asynchronously executes the SPARQL query with the currently bound values.
This function should only be called on TrackerSparqlStatement objects obtained through tracker_sparql_connection_query_statement or SELECT/CONSTRUCT/DESCRIBE statements loaded through tracker_sparql_connection_load_statement_from_gresource.
Parameters:
stmt
–
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.SparqlStatement.prototype.execute_async
function Tracker.SparqlStatement.prototype.execute_async(cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_statement_execute_async'
}
Asynchronously executes the SPARQL query with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.prototype.query_statement or SELECT/CONSTRUCT/DESCRIBE statements loaded through Tracker.SparqlConnection.prototype.load_statement_from_gresource.
Parameters:
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.SparqlStatement.execute_async
def Tracker.SparqlStatement.execute_async (self, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_statement_execute_async'
Asynchronously executes the SPARQL query with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.query_statement or SELECT/CONSTRUCT/DESCRIBE statements loaded through Tracker.SparqlConnection.load_statement_from_gresource.
Parameters:
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_statement_execute_finish
TrackerSparqlCursor * tracker_sparql_statement_execute_finish (TrackerSparqlStatement * stmt, GAsyncResult * res, GError ** error)
Finishes the asynchronous operation started through tracker_sparql_statement_execute_async.
Parameters:
stmt
–
res
–
The GAsyncResult from the callback used to return the TrackerSparqlCursor
error
–
The error which occurred or NULL
Tracker.SparqlStatement.prototype.execute_finish
function Tracker.SparqlStatement.prototype.execute_finish(res: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_statement_execute_finish'
}
Finishes the asynchronous operation started through Tracker.SparqlStatement.prototype.execute_async.
Tracker.SparqlStatement.execute_finish
@raises(GLib.GError)
def Tracker.SparqlStatement.execute_finish (self, res):
#python wrapper for 'tracker_sparql_statement_execute_finish'
Finishes the asynchronous operation started through Tracker.SparqlStatement.execute_async.
tracker_sparql_statement_get_connection
TrackerSparqlConnection * tracker_sparql_statement_get_connection (TrackerSparqlStatement * stmt)
Returns the TrackerSparqlConnection that this statement was created from.
Parameters:
stmt
–
The SPARQL connection of this statement.
Tracker.SparqlStatement.prototype.get_connection
function Tracker.SparqlStatement.prototype.get_connection(): {
// javascript wrapper for 'tracker_sparql_statement_get_connection'
}
Returns the Tracker.SparqlConnection that this statement was created from.
Parameters:
The SPARQL connection of this statement.
Tracker.SparqlStatement.get_connection
def Tracker.SparqlStatement.get_connection (self):
#python wrapper for 'tracker_sparql_statement_get_connection'
Returns the Tracker.SparqlConnection that this statement was created from.
Parameters:
The SPARQL connection of this statement.
tracker_sparql_statement_get_sparql
const gchar * tracker_sparql_statement_get_sparql (TrackerSparqlStatement * stmt)
Returns the SPARQL string that this prepared statement holds.
Parameters:
stmt
–
The contained SPARQL query
Tracker.SparqlStatement.prototype.get_sparql
function Tracker.SparqlStatement.prototype.get_sparql(): {
// javascript wrapper for 'tracker_sparql_statement_get_sparql'
}
Returns the SPARQL string that this prepared statement holds.
Parameters:
The contained SPARQL query
Tracker.SparqlStatement.get_sparql
def Tracker.SparqlStatement.get_sparql (self):
#python wrapper for 'tracker_sparql_statement_get_sparql'
Returns the SPARQL string that this prepared statement holds.
Parameters:
The contained SPARQL query
tracker_sparql_statement_serialize_async
tracker_sparql_statement_serialize_async (TrackerSparqlStatement * stmt, TrackerSerializeFlags flags, TrackerRdfFormat format, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Serializes data into the specified RDF format. The query stmt was
created from must be either a DESCRIBE
or CONSTRUCT
query, an
error will be raised otherwise.
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:
stmt
–
flags
–
serialization flags
format
–
RDF format of the serialized data
cancellable
(
[nullable])
–
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
Since : 3.3
Tracker.SparqlStatement.prototype.serialize_async
function Tracker.SparqlStatement.prototype.serialize_async(flags: Tracker.SerializeFlags, format: Tracker.RdfFormat, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_statement_serialize_async'
}
Serializes data into the specified RDF format. The query stmt was
created from must be either a DESCRIBE
or CONSTRUCT
query, an
error will be raised otherwise.
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
RDF format of the serialized data
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
Since : 3.3
Tracker.SparqlStatement.serialize_async
def Tracker.SparqlStatement.serialize_async (self, flags, format, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_statement_serialize_async'
Serializes data into the specified RDF format. The query stmt was
created from must be either a DESCRIBE
or CONSTRUCT
query, an
error will be raised otherwise.
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
RDF format of the serialized data
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
Since : 3.3
tracker_sparql_statement_serialize_finish
GInputStream * tracker_sparql_statement_serialize_finish (TrackerSparqlStatement * stmt, GAsyncResult * result, GError ** error)
Finishes a tracker_sparql_statement_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.SparqlStatement.prototype.serialize_finish
function Tracker.SparqlStatement.prototype.serialize_finish(result: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_statement_serialize_finish'
}
Finishes a Tracker.SparqlStatement.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.SparqlStatement.serialize_finish
@raises(GLib.GError)
def Tracker.SparqlStatement.serialize_finish (self, result):
#python wrapper for 'tracker_sparql_statement_serialize_finish'
Finishes a Tracker.SparqlStatement.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_statement_update
gboolean tracker_sparql_statement_update (TrackerSparqlStatement * stmt, GCancellable * cancellable, GError ** error)
Executes the SPARQL update with the currently bound values.
This function should only be called on TrackerSparqlStatement objects obtained through tracker_sparql_connection_update_statement or update statements loaded through tracker_sparql_connection_load_statement_from_gresource.
Parameters:
stmt
–
cancellable
–
a GCancellable used to cancel the operation
error
–
GError for error reporting.
Since : 3.5
Tracker.SparqlStatement.prototype.update
function Tracker.SparqlStatement.prototype.update(cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_sparql_statement_update'
}
Executes the SPARQL update with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.prototype.update_statement or update statements loaded through Tracker.SparqlConnection.prototype.load_statement_from_gresource.
Since : 3.5
Tracker.SparqlStatement.update
@raises(GLib.GError)
def Tracker.SparqlStatement.update (self, cancellable):
#python wrapper for 'tracker_sparql_statement_update'
Executes the SPARQL update with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.update_statement or update statements loaded through Tracker.SparqlConnection.load_statement_from_gresource.
Since : 3.5
tracker_sparql_statement_update_async
tracker_sparql_statement_update_async (TrackerSparqlStatement * stmt, GCancellable * cancellable, GAsyncReadyCallback callback, gpointer user_data)
Asynchronously executes the SPARQL update query with the currently bound values.
This function should only be called on TrackerSparqlStatement objects obtained through tracker_sparql_connection_update_statement or update statements loaded through tracker_sparql_connection_load_statement_from_gresource.
Parameters:
stmt
–
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
Since : 3.5
Tracker.SparqlStatement.prototype.update_async
function Tracker.SparqlStatement.prototype.update_async(cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback, user_data: Object): {
// javascript wrapper for 'tracker_sparql_statement_update_async'
}
Asynchronously executes the SPARQL update query with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.prototype.update_statement or update statements loaded through Tracker.SparqlConnection.prototype.load_statement_from_gresource.
Parameters:
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
Since : 3.5
Tracker.SparqlStatement.update_async
def Tracker.SparqlStatement.update_async (self, cancellable, callback, *user_data):
#python wrapper for 'tracker_sparql_statement_update_async'
Asynchronously executes the SPARQL update query with the currently bound values.
This function should only be called on Tracker.SparqlStatement objects obtained through Tracker.SparqlConnection.update_statement or update statements loaded through Tracker.SparqlConnection.load_statement_from_gresource.
Parameters:
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
Since : 3.5
tracker_sparql_statement_update_finish
gboolean tracker_sparql_statement_update_finish (TrackerSparqlStatement * stmt, GAsyncResult * result, GError ** error)
Finishes the asynchronous update started through tracker_sparql_statement_update_async.
Parameters:
stmt
–
result
–
The GAsyncResult from the callback used to return the TrackerSparqlCursor
error
–
The error which occurred or NULL
Since : 3.5
Tracker.SparqlStatement.prototype.update_finish
function Tracker.SparqlStatement.prototype.update_finish(result: Gio.AsyncResult): {
// javascript wrapper for 'tracker_sparql_statement_update_finish'
}
Finishes the asynchronous update started through Tracker.SparqlStatement.prototype.update_async.
Since : 3.5
Tracker.SparqlStatement.update_finish
@raises(GLib.GError)
def Tracker.SparqlStatement.update_finish (self, result):
#python wrapper for 'tracker_sparql_statement_update_finish'
Finishes the asynchronous update started through Tracker.SparqlStatement.update_async.
Since : 3.5
Properties
connection
“connection” TrackerSparqlConnection *
The TrackerSparqlConnection used to perform the query.
Flags : Read / Write / Construct Only
connection
“connection” Tracker.SparqlConnection
The Tracker.SparqlConnection used to perform the query.
Flags : Read / Write / Construct Only
connection
“self.props.connection” Tracker.SparqlConnection
The Tracker.SparqlConnection used to perform the query.
Flags : Read / Write / Construct Only
sparql
“sparql” gchar *
SPARQL query stored in this statement.
Flags : Read / Write / Construct Only
sparql
“self.props.sparql” str
SPARQL query stored in this statement.
Flags : Read / Write / Construct Only
Constants
TRACKER_SPARQL_TYPE_STATEMENT
#define TRACKER_SPARQL_TYPE_STATEMENT TRACKER_TYPE_SPARQL_STATEMENT
TRACKER_TYPE_SPARQL_STATEMENT
#define TRACKER_TYPE_SPARQL_STATEMENT tracker_sparql_statement_get_type ()
The results of the search are