## GDataFreebaseQuery GDataFreebaseQuery — GData Freebase query object |

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataFreebaseQuery * | gdata_freebase_query_new ()
GDataFreebaseQuery * | gdata_freebase_query_new_from_variant ()

## Properties

GVariant * | variant | Read / Write / Construct Only

## Types and Values

| GDataFreebaseQuery
| GDataFreebaseQueryClass

## Object Hierarchy

        GObject
        ╰── GDataQuery
            ╰── GDataFreebaseQuery

## Includes

    #include <gdata/services/freebase/gdata-freebase-query.h>

## Description

GDataFreebaseQuery represents a MQL query specific to the Google Freebase service.

This implementation of GDataQuery respects the `gdata_query_set_max_results()` call.

For more details of Google Freebase API, see the online documentation.

## Functions

### gdata_freebase_query_new ()

    GDataFreebaseQuery *
    gdata_freebase_query_new (const gchar *mql);

Creates a new GDataFreebaseQuery with the MQL query provided in `mql` . MQL is a JSON-based query language, analogous to SPARQL. To learn more about MQL, see the MQL overview and cookbook.

For detailed information on Freebase schemas, The "Schema" section on the main site allows for natural search and navigation through the multiple data properties and domains.

#### Parameters

mql | a MQL query string |

#### Returns

a new GDataFreebaseQuery.

[transfer full]

Since: 0.15.1

### gdata_freebase_query_new_from_variant ()

    GDataFreebaseQuery *
    gdata_freebase_query_new_from_variant (GVariant *variant);

Creates a new GDataFreebaseQuery with the MQL query provided in a serialized form as `variant` of type "a{smv}" containing the JSON data tree of a MQL query. One convenient way to build the variant is using `json_gvariant_serialize()` from a JsonNode. For more information about MQL, see `gdata_freebase_query_new()`.

GDataFreebaseQuery takes ownership on `variant` , if it has a floating reference, it will be sunk. Otherwise an extra reference will be added.

#### Parameters

variant | a variant containing the MQL query structure |

#### Returns

a new GDataFreebaseQuery.

[transfer full]

Since: 0.15.1

## Types and Values

### GDataFreebaseQuery

    typedef struct _GDataFreebaseQuery GDataFreebaseQuery;

All the fields in the GDataFreebaseQuery structure are private and should never be accessed directly.

Since: 0.15.1

### GDataFreebaseQueryClass

    typedef struct {
    } GDataFreebaseQueryClass;

All the fields in the GDataFreebaseQueryClass structure are private and should never be accessed directly.

Since: 0.15.1

## Property Details

### The `“variant”` property

      “variant”                  GVariant *

Variant containing the MQL query. The variant is a very generic container of type "a{smv}", containing (possibly nested) Freebase schema types and values.

Flags: Read / Write / Construct Only

Allowed values: GVariant<a{smv}>

Default value: NULL

Since: 0.15.1