### Constructor

# RB RhythmDBQueryModel new

#### Declaration [src]

    RhythmDBQueryModel*
    rhythmdb_query_model_new (
      RhythmDB* db,
      GPtrArray* query,
      GCompareDataFunc sort_func,
      gpointer sort_data,
      GDestroyNotify sort_data_destroy,
      gboolean sort_reverse
    )

#### Description [src]

Constructs a new `RhythmDBQueryModel` with the specified query and sorting parameters.

This constructor is not directly available to language bindings.

#### Parameters

`db`

  Type: `RhythmDB`

  The `RhythmDB`.

  The data is owned by the caller of the function.

`query`

  Type: An array of `gpointer`

  The query for the new model.

  The data is owned by the caller of the function.

`sort_func`

  Type: `GCompareDataFunc`

  The sort function for the new model.

`sort_data`

  Type: `gpointer`

  Data to pass to the sort function.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`sort_data_destroy`

  Type: `GDestroyNotify`

  Function to call when destroying the sort data.

`sort_reverse`

  Type: `gboolean`

  If `TRUE`, reverse the sort order.

#### Return value

Type: `RhythmDBQueryModel`

The newly constructed query model.

The caller of the function takes ownership of the data, and is responsible for freeing it.