## GnomeDbServerDataType

GnomeDbServerDataType — Represents a data type in the DBMS

## Synopsis

                GnomeDbServerDataType;
                GnomeDbServerDataTypePrivate;
    GType       gnome_db_server_data_type_get_type
                                                (void);
    GObject*    gnome_db_server_data_type_new   (GnomeDbServer *srv);
    void        gnome_db_server_data_type_set_sqlname
                                                (GnomeDbServerDataType *dt,
                                                 const gchar *sqlname);
    const gchar* gnome_db_server_data_type_get_sqlname
                                                (GnomeDbServerDataType *dt);
    void        gnome_db_server_data_type_set_gda_type
                                                (GnomeDbServerDataType *dt,
                                                 GdaValueType gda_type);
    GdaValueType gnome_db_server_data_type_get_gda_type
                                                (GnomeDbServerDataType *dt);
    void        gnome_db_server_data_type_add_synonym
                                                (GnomeDbServerDataType *dt,
                                                 const gchar *synonym);
    const GSList* gnome_db_server_data_type_get_synonyms
                                                (GnomeDbServerDataType *dt);
    void        gnome_db_server_data_type_clear_synonyms
                                                (GnomeDbServerDataType *dt);
    void        gnome_db_server_data_type_set_handler
                                                (GnomeDbServerDataType *dt,
                                                 GnomeDbDataHandler *dh);
    GnomeDbDataHandler* gnome_db_server_data_type_get_handler
                                                (GnomeDbServerDataType *dt);

## Object Hierarchy

      GObject
       +----GnomeDbBase
             +----GnomeDbServerDataType

## Implemented Interfaces

GnomeDbServerDataType implements GnomeDbXmlStorage.

## Properties

      "prop"                 gpointer              : Read / Write

## Signals

    "templ-signal"
                void        user_function      (GnomeDbServerDataType *dbserverdatatype,
                                                gpointer user_data);

## Description

DBMS systems usually have quite large set of data types (which can sometimes be expanded by users). Each GnomeDbServerDataType object represents one data type. The libgda library provides some data types, and so it is possible, for each GnomeDbServerDataType object, to get the corresponding libgda data type.

Every data type can be represented by a GnomeDbServerDataType (even user defined data types). Complex data types (data types described as the aggregation of several other data types, like C structures) are handled like any other data type and it is not possible to individually access the different components of the complex data type (it is, however, possible to write a plugin for this data type).

It implements the GnomeDbXmlStorage interface.

## Details

### GnomeDbServerDataType

    typedef struct _GnomeDbServerDataType GnomeDbServerDataType;

### GnomeDbServerDataTypePrivate

    typedef struct _GnomeDbServerDataTypePrivate GnomeDbServerDataTypePrivate;

### gnome_db_server_data_type_get_type ()

    GType       gnome_db_server_data_type_get_type
                                                (void);

Returns : |

### gnome_db_server_data_type_new ()

    GObject*    gnome_db_server_data_type_new   (GnomeDbServer *srv);

Creates a new GnomeDbServerDataType object

`srv` : | a GnomeDbServer object
Returns : | the new object

### gnome_db_server_data_type_set_sqlname ()

    void        gnome_db_server_data_type_set_sqlname
                                                (GnomeDbServerDataType *dt,
                                                 const gchar *sqlname);

Set the SQL name of the data type.

`dt` : | a GnomeDbServerDataType object
`sqlname` : |

### gnome_db_server_data_type_get_sqlname ()

    const gchar* gnome_db_server_data_type_get_sqlname
                                                (GnomeDbServerDataType *dt);

Get the DBMS's name of a data type.

`dt` : | a GnomeDbServerDataType object
Returns : | the name of the data type

### gnome_db_server_data_type_set_gda_type ()

    void        gnome_db_server_data_type_set_gda_type
                                                (GnomeDbServerDataType *dt,
                                                 GdaValueType gda_type);

Set the gda type for a data type

`dt` : | a GnomeDbServerDataType object
`gda_type` : |

### gnome_db_server_data_type_get_gda_type ()

    GdaValueType gnome_db_server_data_type_get_gda_type
                                                (GnomeDbServerDataType *dt);

Get the gda type of a data type

`dt` : | a GnomeDbServerDataType object
Returns : | the gda type

### gnome_db_server_data_type_add_synonym ()

    void        gnome_db_server_data_type_add_synonym
                                                (GnomeDbServerDataType *dt,
                                                 const gchar *synonym);

Sets a new synonym to the `dt` data type.

`dt` : | a GnomeDbServerDataType object
`synonym` : |

### gnome_db_server_data_type_get_synonyms ()

    const GSList* gnome_db_server_data_type_get_synonyms
                                                (GnomeDbServerDataType *dt);

Get a list of `dt`'s synonyms

`dt` : | a GnomeDbServerDataType object
Returns : | a list of strings which must not be modified

### gnome_db_server_data_type_clear_synonyms ()

    void        gnome_db_server_data_type_clear_synonyms
                                                (GnomeDbServerDataType *dt);

Removes any synonym attached to `dt`

`dt` : | a GnomeDbServerDataType object

### gnome_db_server_data_type_set_handler ()

    void        gnome_db_server_data_type_set_handler
                                                (GnomeDbServerDataType *dt,
                                                 GnomeDbDataHandler *dh);

Forces the GnomeDbDataHandler associated with the data type.

`dt` : | a GnomeDbServerDataType object
`dh` : | an object which implements the GnomeDbDataHandler interface

### gnome_db_server_data_type_get_handler ()

    GnomeDbDataHandler* gnome_db_server_data_type_get_handler
                                                (GnomeDbServerDataType *dt);

Get the GnomeDbDataHandler associated with the data type.

`dt` : | a GnomeDbServerDataType object
Returns : | the GnomeDbDataHandler

## Property Details

### The "`prop`" property

      "prop"                 gpointer              : Read / Write

## Signal Details

### The "templ-signal" signal

    void        user_function                  (GnomeDbServerDataType *dbserverdatatype,
                                                gpointer user_data);

`dbserverdatatype` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.