### Interface

# RB RhythmDBQueryResults

#### Description [src]

    interface RB.RhythmDBQueryResults : GObject.Object

This is the interface that `RhythmDB` uses to report results of database queries. When running a query, it first calls rhythmdb_query_results_set_query, then passes entries matching the query to rhythmdb_query_results_add_results in batches, and finally calls rhythmdb_query_results_query_complete. There are no guarantees as to which threads the calls are made from.

#### Prerequisite

In order to implement RhythmDBQueryResults, your type must inherit from`GObject`.

#### Implementations

- RhythmDBQueryModel
- RhythmDBQueryResultList

#### Instance methods

###### rhythmdb_query_results_add_results

Provides a new set of query results. References must be taken on the entries.

###### rhythmdb_query_results_query_complete

Called when the query is complete and all entries that match the query have been supplied to rhythmdb_query_results_add_results. If the object implementing this interface needs to identify newly added or changed entries that match the query, it needs to use the entry-added, entry-deleted and entry-changed signals from `RhythmDB`.

###### rhythmdb_query_results_set_query

When a new query is run, this method is invoked to give the object implementing this interface a chance to take a copy of the query criteria, so that it can evaluate the query for newly added or changed entries once the query is complete.

#### Interface structure

    struct RBRhythmDBQueryResultsIface {
      GTypeInterface g_iface;
      void (* set_query) (
        RhythmDBQueryResults* results,
        GPtrArray* query
      );
      void (* add_results) (
        RhythmDBQueryResults* results,
        GPtrArray* entries
      );
      void (* query_complete) (
        RhythmDBQueryResults* results
      );

    }

No description available.

###### Interface members

`g_iface`

    GTypeInterface

| No description available.

`set_query`

    void (* set_query) (
        RhythmDBQueryResults* results,
        GPtrArray* query
      )

| No description available.

`add_results`

    void (* add_results) (
        RhythmDBQueryResults* results,
        GPtrArray* entries
      )

| No description available.

`query_complete`

    void (* query_complete) (
        RhythmDBQueryResults* results
      )

| No description available.

#### Virtual methods

###### RB.RhythmDBQueryResults.add_results

Provides a new set of query results. References must be taken on the entries.

###### RB.RhythmDBQueryResults.query_complete

Called when the query is complete and all entries that match the query have been supplied to rhythmdb_query_results_add_results. If the object implementing this interface needs to identify newly added or changed entries that match the query, it needs to use the entry-added, entry-deleted and entry-changed signals from `RhythmDB`.

###### RB.RhythmDBQueryResults.set_query

When a new query is run, this method is invoked to give the object implementing this interface a chance to take a copy of the query criteria, so that it can evaluate the query for newly added or changed entries once the query is complete.