![]() |
![]() |
![]() |
Tracker SPARQL Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <tracker-sparql.h> TrackerSparqlCursor; TrackerSparqlConnection* tracker_sparql_cursor_get_connection (TrackerSparqlCursor *self
); gint tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor *self
); const char* tracker_sparql_cursor_get_string (TrackerSparqlCursor *self
,gint column
,glong *length
); gboolean tracker_sparql_cursor_next (TrackerSparqlCursor *self
,GCancellable *cancellable
,GError **error
); void tracker_sparql_cursor_next_async (TrackerSparqlCursor *self
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor *self
,GAsyncResult *_res_
,GError **error
); void tracker_sparql_cursor_rewind (TrackerSparqlCursor *self
); void tracker_sparql_cursor_set_connection (TrackerSparqlCursor *self
,TrackerSparqlConnection *value
);
TrackerSparqlCursor is an object which provides methods to iterate the results of a query to the Tracker Store.
typedef struct _TrackerSparqlCursor TrackerSparqlCursor;
The TrackerSparqlCursor object represents an iterator of results.
TrackerSparqlConnection* tracker_sparql_cursor_get_connection
(TrackerSparqlCursor *self
);
Returns the connection used to retrieve the results.
|
a TrackerSparqlCursor |
Returns : |
a TrackerSparqlConnection. The returned object must not be freed by the caller. |
gint tracker_sparql_cursor_get_n_columns (TrackerSparqlCursor *self
);
Returns the number of columns available in the results to iterate.
This method should only be called after a successful
tracker_sparql_cursor_next()
; otherwise its return value will be
undefined.
|
a TrackerSparqlCursor |
Returns : |
a gint with the number of columns. |
const char* tracker_sparql_cursor_get_string (TrackerSparqlCursor *self
,gint column
,glong *length
);
Returns the string at column
in the current row being iterated.
|
a TrackerSparqlCursor |
|
column number to retrieve (first one is 0) |
|
length of the returned string |
Returns : |
a string, which should not be freed by the caller. NULL is returned if the column number is in the [0,n_columns] range. |
gboolean tracker_sparql_cursor_next (TrackerSparqlCursor *self
,GCancellable *cancellable
,GError **error
);
Iterates to the next result. The API call is completely synchronous, so it may block.
|
a TrackerSparqlCursor |
|
a GCancellable used to cancel the operation |
|
GError for error reporting. |
Returns : |
FALSE if no more results found, TRUE otherwise. |
void tracker_sparql_cursor_next_async (TrackerSparqlCursor *self
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Iterates, asynchronously, to the next result.
|
a TrackerSparqlCursor |
|
a GCancellable used to cancel the operation |
|
user-defined GAsyncReadyCallback to be called when asynchronous operation is finished. |
|
user-defined data to be passed to _callback_
|
gboolean tracker_sparql_cursor_next_finish (TrackerSparqlCursor *self
,GAsyncResult *_res_
,GError **error
);
|
|
|
|
|
|
Returns : |
void tracker_sparql_cursor_rewind (TrackerSparqlCursor *self
);
Resets the iterator to point back to the first result.
|
a TrackerSparqlCursor |
void tracker_sparql_cursor_set_connection (TrackerSparqlCursor *self
,TrackerSparqlConnection *value
);
|
|
|
"connection"
property"connection" TrackerSparqlConnection* : Read / Write
The TrackerSparqlConnection used to retrieve the results.