## Connection methods

The Tracker SPARQL library provides several underlying methods to perform queries and updates to the Tracker Store.

- Direct Access:

  All Read-Only operations done in a TrackerSparqlConnection will by default use this method, as it doesn't involve any D-Bus traffic, and thus, it will perform much better. There is no real connection with the Tracker Store in this case, as the access is direct to the underlying SQLite database. Again, note that this method applies only to Read-Only operations.

  If you plan to only do Read-Only queries to the store, you can get the TrackerSparqlConnection object using `tracker_sparql_connection_get_direct`. Otherwise, if you also plan to use the same connection object for updates, you must get the connection object with `tracker_sparql_connection_get`.

- D-Bus FD passing:

  If the system runs a D-Bus ≥ 1.3.1, the TrackerSparqlConnection will use the File Descriptor passing method via D-Bus to connect to the Store, which is faster than the plain D-Bus for queries involving a lot of traffic. This method will be used for all non read-only queries on TrackerSparqlConnection objects obtained with `tracker_sparql_connection_get`.

- D-Bus:

  If the system runs a D-Bus < 1.3.1, the TrackerSparqlConnection will use the standard D-Bus method to connect to the Store. This method will be used for all non read-only queries on TrackerSparqlConnection objects obtained with `tracker_sparql_connection_get`.

Please note that the user of the library cannot choose a specific method to be used, as that is done automatically by the TrackerSparqlConnection depending on the available possibilities.