Tsparql.Batch
Description: Reference for Tsparql.Batch

### Class

# TsparqlBatch

since: 3.1

#### Description [src]

    abstract class Tsparql.Batch : GObject.Object
    {
      /* No available fields */
    }

`TrackerBatch` executes a series of SPARQL updates and RDF data insertions within a transaction.

A batch is created with `tracker_sparql_connection_create_batch()`. To add resources use `tracker_batch_add_resource()`, `tracker_batch_add_sparql()` or `tracker_batch_add_statement()`.

When a batch is ready for execution, use `tracker_batch_execute()` or `tracker_batch_execute_async()`. The batch is executed as a single transaction, it will succeed or fail entirely.

This object has a single use, after the batch is executed it can only be finished and freed.

The mapping of blank node labels is global in a `TrackerBatch`, referencing the same blank node label in different operations in a batch will resolve to the same resource.

Available since: 3.1

#### Ancestors

- GObject

#### Instance methods

###### tracker_batch_add_rdf

Inserts the RDF data contained in `stream` as part of `batch`.

since: 3.6

###### tracker_batch_add_resource

Adds the RDF represented by `resource` to `batch`.

since: 3.1

###### tracker_batch_add_sparql

Adds an SPARQL update string to `batch`.

since: 3.1

###### tracker_batch_add_statement

Adds a `TrackerSparqlStatement` containing an SPARQL update. The statement will be executed once in the batch, with the parameters bound as specified in the variable arguments.

since: 3.5

###### tracker_batch_add_statementv

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

since: 3.5

###### tracker_batch_execute

Executes the batch. This operations happens synchronously.

since: 3.1

###### tracker_batch_execute_async

Executes the batch. This operation happens asynchronously, when finished `callback` will be executed.

since: 3.1

###### tracker_batch_execute_finish

Finishes the operation started with `tracker_batch_execute_async()`.

since: 3.1

###### tracker_batch_get_connection

Returns the `TrackerSparqlConnection` that this batch was created from.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Tsparql.Batch:connection

The `TrackerSparqlConnection` the batch belongs to.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct TsparqlBatchClass {
      /* no available fields */
    }

No description available.