[tracker/rss-enclosures] libtracker-sparql: multi-insert: Documented the _finish of the array_update API
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-sparql: multi-insert: Documented the _finish of the array_update API
- Date: Wed, 24 Nov 2010 02:02:46 +0000 (UTC)
commit 81b39158c1e1fde57c33f7c1c11fd0dcbc78c37f
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Oct 14 14:37:47 2010 +0200
libtracker-sparql: multi-insert: Documented the _finish of the array_update API
src/libtracker-sparql/tracker-connection.vala | 36 ++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-connection.vala b/src/libtracker-sparql/tracker-connection.vala
index e326c5d..71d1657 100644
--- a/src/libtracker-sparql/tracker-connection.vala
+++ b/src/libtracker-sparql/tracker-connection.vala
@@ -441,11 +441,45 @@ public abstract class Tracker.Sparql.Connection : Object {
* array is its own transaction. This means that update n+1 is not halted
* due to an error in update n.
*
+ * Since: 0.10
+ */
+
+ /**
+ * tracker_sparql_connection_update_array_finish:
+ * @self: a #TrackerSparqlConnection
+ * @_res_: a #GAsyncResult with the result of the operation
+ * @error: #GError for error reporting.
+ *
+ * Finishes the asynchronous SPARQL update_array operation.
+ *
+ * <example>
+ * <programlisting>
+ * static void
+ * async_update_array_callback (GObject *source_object,
+ * GAsyncResult *result,
+ * gpointer user_data)
+ * {
+ * GError *error = NULL;
+ * AsyncData *data = user_data;
+ * GPtrArray *errors;
+ * guint i;
+ * errors = tracker_sparql_connection_update_array_finish (connection, result, &error);
+ * g_assert_no_error (error);
+ * for (i = 0; i < errors->len; i++) {
+ * const GError = g_ptr_array_index (errors, i);
+ * }
+ * g_ptr_array_unref (errors);
+ * }
+ * </programlisting>
+ * </example>
+ *
* Returns: a #GPtrArray of size @sparql_length1 with elements that are
* either NULL or a GError instance. The returned array should be freed with
* g_ptr_array_unref when no longer used, not with g_ptr_array_free. When
* you use errors of the array, you must g_error_copy them. Errors inside of
- * the array must be considered as const data and not freed.
+ * the array must be considered as const data and not freed. The index of
+ * the error corresponds to the index of the update query in the array that
+ * you passed to tracker_sparql_connection_update_array_async.
*
* Since: 0.10
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]