Top | ![]() |
![]() |
![]() |
![]() |
TrackerSparqlCursor is an object which provides methods to iterate the results of a query to the Tracker Store.
TrackerSparqlConnection *
tracker_sparql_cursor_get_connection (TrackerSparqlCursor *cursor
);
Returns the TrackerSparqlConnection associated with this TrackerSparqlCursor.
the cursor TrackerSparqlConnection. The returned object must not be unreferenced by the caller.
[transfer none]
gint
tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor *cursor
);
This method should only be called after a successful
tracker_sparql_cursor_next()
; otherwise its return value
will be undefined.
const gchar * tracker_sparql_cursor_get_string (TrackerSparqlCursor *cursor
,gint column
,glong *length
);
Retrieves a string representation of the data in the current
row in column
.
cursor |
||
column |
column number to retrieve (first one is 0) |
|
length |
length of the returned string, or |
[out][nullable] |
a string which must not be freed. NULL
is returned if
the column is not in the [0,n_columns] range.
[nullable]
gboolean tracker_sparql_cursor_get_boolean (TrackerSparqlCursor *cursor
,gint column
);
Retrieve a boolean for the current row in column
.
gdouble tracker_sparql_cursor_get_double (TrackerSparqlCursor *cursor
,gint column
);
Retrieve a double for the current row in column
.
gint64 tracker_sparql_cursor_get_integer (TrackerSparqlCursor *cursor
,gint column
);
Retrieve an integer for the current row in column
.
TrackerSparqlValueType tracker_sparql_cursor_get_value_type (TrackerSparqlCursor *cursor
,gint column
);
The data type bound to the current row in column
is returned.
const gchar * tracker_sparql_cursor_get_variable_name (TrackerSparqlCursor *cursor
,gint column
);
Retrieves the variable name for the current row in column
.
void
tracker_sparql_cursor_close (TrackerSparqlCursor *cursor
);
Closes the iterator, making it invalid.
gboolean tracker_sparql_cursor_is_bound (TrackerSparqlCursor *cursor
,gint column
);
If the current row and column
are bound to a value, TRUE
is returned.
gboolean tracker_sparql_cursor_next (TrackerSparqlCursor *cursor
,GCancellable *cancellable
,GError **error
);
Iterates to the next result. This is completely synchronous and it may block.
cursor |
||
cancellable |
a GCancellable used to cancel the operation |
|
error |
GError for error reporting. |
void tracker_sparql_cursor_next_async (TrackerSparqlCursor *cursor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Iterates, asynchronously, to the next result.
cursor |
||
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 |
gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor *cursor
,GAsyncResult *res
,GError **error
);
Finishes the asynchronous iteration to the next result.
cursor |
||
res |
a GAsyncResult with the result of the operation |
|
error |
GError for error reporting. |
void
tracker_sparql_cursor_rewind (TrackerSparqlCursor *cursor
);
Resets the iterator to point back to the first result.
typedef struct _TrackerSparqlCursor TrackerSparqlCursor;
The TrackerSparqlCursor object represents an iterator of results.
Enumeration with the possible types of the cursor's cells
“connection”
property“connection” TrackerSparqlConnection *
The TrackerSparqlConnection used to retrieve the results.
Owner: TrackerSparqlCursor
Flags: Read / Write / Construct Only
“n-columns”
property“n-columns” gint
n-columns.
Owner: TrackerSparqlCursor
Flags: Read
Default value: 0