add_statementv


Description:

[ Version ( since = "3.5" ) ]
public void add_statementv (Statement stmt, string[] variable_names, Value[] values)

Adds a [class@SparqlStatement] 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:

```c 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); ``` ```python batch.add_statement(stmt, ['name'], ['John Smith']); ``` ```js batch.add_statement(stmt, ['name'], ['John Smith']); ```

A [class@SparqlStatement] may be used on multiple [method@Batch.add_statement] calls with the same or different values, on the same or different `TrackerBatch` objects.

This function should only be called on [class@SparqlStatement] objects obtained through [method@SparqlConnection.update_statement] or update statements loaded through [method@SparqlConnection.load_statement_from_gresource].

Parameters:

this

A `TrackerBatch`

stmt

A [class@SparqlStatement] containing a SPARQL update

variable_names

The names of each bound parameter

values

The values of each bound parameter

n_values

The number of bound parameters