### Method

# Tracker Batch add_statementv

since: 3.5

#### Declaration [src]

    void
    tracker_batch_add_statementv (
      TrackerBatch* batch,
      TrackerSparqlStatement* stmt,
      guint n_values,
      const gchar** variable_names,
      const GValue* values
    )

#### Description [src]

Adds a `TrackerSparqlStatement` containing an SPARQL update. The statement will be executed once in the batch, with the values bound as specified by `variable_names` and `values`.

For example, for a statement that has a single `~name` parameter, it could be given a value for execution with the given code:

    const char *names = { "name" };
    const GValue values[G_N_ELEMENTS (names)] = { 0, };

    g_value_init (&values[0], G_TYPE_STRING);
    g_value_set_string (&values[0], "John Smith");
    tracker_batch_add_statementv (batch, stmt,
                                  G_N_ELEMENTS (names),
                                  names, values);

    batch.add_statement(stmt, ['name'], ['John Smith']);

    batch.add_statement(stmt, ['name'], ['John Smith']);

A `TrackerSparqlStatement` may be used on multiple `tracker_batch_add_statement()` calls with the same or different values, on the same or different `TrackerBatch` objects.

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()`.

Available since: 3.5

This method is renamed to `tracker_batch_add_statement()` in language bindings

#### Parameters

`stmt`

  Type: `TrackerSparqlStatement`

  A `TrackerSparqlStatement` containing a SPARQL update.

  The data is owned by the caller of the method.

`n_values`

  Type: `guint`

  The number of bound parameters.

`variable_names`

  Type: An array of `gchar*`

  The names of each bound parameter.

  The length of the array is specified in the `n_values` argument.
  The data is owned by the caller of the method.
  Each element is a NUL terminated UTF-8 string.

`values`

  Type: An array of `GValue`

  The values of each bound parameter.

  The length of the array is specified in the `n_values` argument.
  The data is owned by the caller of the method.