Top |
Functions
TrackerSparqlConnection * | tracker_sparql_cursor_get_connection () |
gint | tracker_sparql_cursor_get_n_columns () |
const gchar * | tracker_sparql_cursor_get_string () |
gboolean | tracker_sparql_cursor_get_boolean () |
gdouble | tracker_sparql_cursor_get_double () |
gint64 | tracker_sparql_cursor_get_integer () |
TrackerSparqlValueType | tracker_sparql_cursor_get_value_type () |
const gchar * | tracker_sparql_cursor_get_variable_name () |
void | tracker_sparql_cursor_close () |
gboolean | tracker_sparql_cursor_is_bound () |
gboolean | tracker_sparql_cursor_next () |
void | tracker_sparql_cursor_next_async () |
gboolean | tracker_sparql_cursor_next_finish () |
void | tracker_sparql_cursor_rewind () |
Description
TrackerSparqlCursor is an object which provides methods to iterate the results of a query to the Tracker Store.
Functions
tracker_sparql_cursor_get_connection ()
TrackerSparqlConnection *
tracker_sparql_cursor_get_connection (TrackerSparqlCursor *self
);
Returns
the TrackerSparqlConnection associated with this TrackerSparqlCursor. The returned object must not be unreferenced by the caller.
Since: 0.10
tracker_sparql_cursor_get_n_columns ()
gint
tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor *self
);
This method should only be called after a successful
tracker_sparql_cursor_next()
; otherwise its return value
will be undefined.
Since: 0.10
tracker_sparql_cursor_get_string ()
const gchar * tracker_sparql_cursor_get_string (TrackerSparqlCursor *self
,gint column
,glong *length
);
Retrieves a string representation of the data in the current
row in column
.
Parameters
self |
||
column |
column number to retrieve (first one is 0) |
|
length |
length of the returned string |
Returns
a string which must not be freed. NULL
is returned if
the column is not in the [0,n_columns] range.
Since: 0.10
tracker_sparql_cursor_get_boolean ()
gboolean tracker_sparql_cursor_get_boolean (TrackerSparqlCursor *self
,gint column
);
Retrieve a boolean for the current row in column
.
Since: 0.10
tracker_sparql_cursor_get_double ()
gdouble tracker_sparql_cursor_get_double (TrackerSparqlCursor *self
,gint column
);
Retrieve a double for the current row in column
.
Since: 0.10
tracker_sparql_cursor_get_integer ()
gint64 tracker_sparql_cursor_get_integer (TrackerSparqlCursor *self
,gint column
);
Retrieve an integer for the current row in column
.
Since: 0.10
tracker_sparql_cursor_get_value_type ()
TrackerSparqlValueType tracker_sparql_cursor_get_value_type (TrackerSparqlCursor *self
,gint column
);
The data type bound to the current row in column
is returned.
Since: 0.10
tracker_sparql_cursor_get_variable_name ()
const gchar * tracker_sparql_cursor_get_variable_name (TrackerSparqlCursor *self
,gint column
);
Retrieves the variable name for the current row in column
.
Since: 0.10
tracker_sparql_cursor_close ()
void
tracker_sparql_cursor_close (TrackerSparqlCursor *self
);
Closes the iterator, making it invalid.
Since: 0.12
tracker_sparql_cursor_is_bound ()
gboolean tracker_sparql_cursor_is_bound (TrackerSparqlCursor *self
,gint column
);
If the current row and column
are bound to a value, TRUE
is returned.
Since: 0.10
tracker_sparql_cursor_next ()
gboolean tracker_sparql_cursor_next (TrackerSparqlCursor *self
,GCancellable *cancellable
,GError **error
);
Iterates to the next result. This is completely synchronous and it may block.
Parameters
self |
||
cancellable |
a GCancellable used to cancel the operation |
|
error |
GError for error reporting. |
Since: 0.10
tracker_sparql_cursor_next_async ()
void tracker_sparql_cursor_next_async (TrackerSparqlCursor *self
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
tracker_sparql_cursor_next_finish ()
gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor *self
,GAsyncResult *_res_
,GError **error
);
Finishes the asynchronous iteration to the next result.
Parameters
self |
||
_res_ |
a GAsyncResult with the result of the operation |
|
error |
GError for error reporting. |
Since: 0.10
tracker_sparql_cursor_rewind ()
void
tracker_sparql_cursor_rewind (TrackerSparqlCursor *self
);
Resets the iterator to point back to the first result.
Since: 0.10
Types and Values
struct TrackerSparqlCursor
struct TrackerSparqlCursor;
The TrackerSparqlCursor object represents an iterator of results.
enum TrackerSparqlValueType
Enumeration with the possible types of the cursor's cells
Members
Unbound value type |
||
Uri value type, rdfs:Resource |
||
String value type, xsd:string |
||
Integer value type, xsd:integer |
||
Double value type, xsd:double |
||
Datetime value type, xsd:dateTime |
||
Blank node value type |
||
Boolean value type, xsd:boolean |
Since: 0.10
Property Details
The “connection”
property
“connection” TrackerSparqlConnection *
The TrackerSparqlConnection used to retrieve the results.
Flags: Read / Write
Since: 0.10