## GnomeDbQfield

GnomeDbQfield — Parent class for any query's field

## Synopsis

                GnomeDbQfield;
    GType       gnome_db_qfield_get_type        (void);
    GObject*    gnome_db_qfield_new_from_xml    (GnomeDbQuery *query,
                                                 xmlNodePtr node,
                                                 GError **error);
    GObject*    gnome_db_qfield_new_copy        (GnomeDbQfield *orig);
    GObject*    gnome_db_qfield_new_from_sql    (GnomeDbQuery *query,
                                                 const gchar *sqlfield,
                                                 GError **error);
    GnomeDbServerDataType* gnome_db_qfield_get_data_type
                                                (GnomeDbQfield *qfield);
    GSList*     gnome_db_qfield_get_parameters  (GnomeDbQfield *qfield);
    void        gnome_db_qfield_set_alias       (GnomeDbQfield *qfield,
                                                 const gchar *alias);
    const gchar* gnome_db_qfield_get_alias      (GnomeDbQfield *qfield);
    void        gnome_db_qfield_set_visible     (GnomeDbQfield *qfield,
                                                 gboolean visible);
    gboolean    gnome_db_qfield_is_visible      (GnomeDbQfield *qfield);
    void        gnome_db_qfield_set_internal    (GnomeDbQfield *qfield,
                                                 gboolean internal);
    gboolean    gnome_db_qfield_is_internal     (GnomeDbQfield *qfield);
    gboolean    gnome_db_qfield_is_equal        (GnomeDbQfield *qfield1,
                                                 GnomeDbQfield *qfield2);
    gboolean    gnome_db_qfield_is_list         (GnomeDbQfield *qfield);

## Object Hierarchy

      GObject
       +----GnomeDbBase
             +----GnomeDbQfield
                   +----GnomeDbQfAll
                   +----GnomeDbQfField
                   +----GnomeDbQfFunc
                   +----GnomeDbQfAgg
                   +----GnomeDbQfValue

## Properties

      "prop"                 gpointer              : Read / Write

## Description

## Details

### GnomeDbQfield

    typedef struct _GnomeDbQfield GnomeDbQfield;

### gnome_db_qfield_get_type ()

    GType       gnome_db_qfield_get_type        (void);

Returns : |

### gnome_db_qfield_new_from_xml ()

    GObject*    gnome_db_qfield_new_from_xml    (GnomeDbQuery *query,
                                                 xmlNodePtr node,
                                                 GError **error);

This is an object factory which does create instances of class inheritants of the GnomeDbDfield class. Ths GnomeDbQfield object MUST then be attached to `query`

`query` : | a GnomeDbQuery object
`node` : | an XML node corresponding to a GNOME_DB_QFIELD tag
`error` : | location to store error, or `NULL`
Returns : | the newly created object

### gnome_db_qfield_new_copy ()

    GObject*    gnome_db_qfield_new_copy        (GnomeDbQfield *orig);

This is a copy constructor

`orig` : | a GnomeDbQfield to copy
Returns : | the new object

### gnome_db_qfield_new_from_sql ()

    GObject*    gnome_db_qfield_new_from_sql    (GnomeDbQuery *query,
                                                 const gchar *sqlfield,
                                                 GError **error);

Creates a new GnomeDbQfield from its SQL representation

`query` : | a GnomeDbQuery object
`sqlfield` : | a SQL statement representing a query field
`error` : | location to store error, or `NULL`
Returns : | a new GnomeDbQfield object, or `NULL` if an error occured

### gnome_db_qfield_get_data_type ()

    GnomeDbServerDataType* gnome_db_qfield_get_data_type
                                                (GnomeDbQfield *qfield);

Get the GnomeDbServerDataType represented by the `qfield` object: for a function it returns the return type, for a value, it returns its type, etc.

`qfield` : | a GnomeDbQfield object
Returns : | the data type, or `NULL` if `qfield` does not have a data type.

### gnome_db_qfield_get_parameters ()

    GSList*     gnome_db_qfield_get_parameters  (GnomeDbQfield *qfield);

Get a list of all the parameters needed to `qfield` to be rendered as a valid statement

`qfield` : | a GnomeDbQfield object
Returns : | a new list of parameters for `qfield`

### gnome_db_qfield_set_alias ()

    void        gnome_db_qfield_set_alias       (GnomeDbQfield *qfield,
                                                 const gchar *alias);

Sets `qfield`'s alias

`qfield` : | a GnomeDbQfield object
`alias` : | the alias to set `qfield` to

### gnome_db_qfield_get_alias ()

    const gchar* gnome_db_qfield_get_alias      (GnomeDbQfield *qfield);

Get `qfield`'s alias

`qfield` : | a GnomeDbQfield object
Returns : | the alias

### gnome_db_qfield_set_visible ()

    void        gnome_db_qfield_set_visible     (GnomeDbQfield *qfield,
                                                 gboolean visible);

Sets the visibility of `qfield`. A visible field will appear in the query's corresponding (virtual) entity, whereas a non visible one will be hidden (and possibly not taking part in the query).

`qfield` : | a GnomeDbQfield object
`visible` : |

### gnome_db_qfield_is_visible ()

    gboolean    gnome_db_qfield_is_visible      (GnomeDbQfield *qfield);

`qfield` : | a GnomeDbQfield object
Returns : | TRUE if `field` is visible

### gnome_db_qfield_set_internal ()

    void        gnome_db_qfield_set_internal    (GnomeDbQfield *qfield,
                                                 gboolean internal);

Sets weather `qfield` is internal or not. Internal fields in a query are fields added or changed by libgnomedb itself, such fields may or may not be visible.

`qfield` : | a GnomeDbQfield object
`internal` : |

### gnome_db_qfield_is_internal ()

    gboolean    gnome_db_qfield_is_internal     (GnomeDbQfield *qfield);

`qfield` : | a GnomeDbQfield object
Returns : | TRUE if `field` is internal

### gnome_db_qfield_is_equal ()

    gboolean    gnome_db_qfield_is_equal        (GnomeDbQfield *qfield1,
                                                 GnomeDbQfield *qfield2);

Compares the `qfield1` and `qfield2`. The name and aliases of the two fields are not compared, only the contents of the fields are.

`qfield1` : | a GnomeDbQfield object
`qfield2` : | a GnomeDbQfield object
Returns : | TRUE if they are equal and FALSE otherwise

### gnome_db_qfield_is_list ()

    gboolean    gnome_db_qfield_is_list         (GnomeDbQfield *qfield);

Tells if `qfield` can potentially represent a list of values.

`qfield` : | a GnomeDbQfield object
Returns : | TRUE if `field` can be a list of values

## Property Details

### The "`prop`" property

      "prop"                 gpointer              : Read / Write