GdaDictType

GdaDictType — Represents a data type in the DBMS

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GdaObject
        ╰── GdaDictType

Implemented Interfaces

GdaDictType implements GdaXmlStorage.

Description

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

Every data type can be represented by a GdaDictType (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 GdaXmlStorage interface.

Functions

gda_dict_type_new ()

GdaDictType *
gda_dict_type_new (GdaDict *dict);

Creates a new GdaDictType object which represent a data type defined in a data dictionary

Parameters

dict

a GdaDict object, or NULL

 

Returns

the new object


gda_dict_type_set_sqlname ()

void
gda_dict_type_set_sqlname (GdaDictType *dt,
                           const gchar *sqlname);

Set the SQL name of the data type.

Parameters

dt

a GdaDictType object

 

gda_dict_type_get_sqlname ()

const gchar *
gda_dict_type_get_sqlname (GdaDictType *dt);

Get the DBMS's name of a data type.

Parameters

dt

a GdaDictType object

 

Returns

the name of the data type


gda_dict_type_set_g_type ()

void
gda_dict_type_set_g_type (GdaDictType *dt,
                          GType g_type);

Set the gda type for a data type

Parameters

dt

a GdaDictType object

 

gda_dict_type_get_g_type ()

GType
gda_dict_type_get_g_type (GdaDictType *dt);

Get the gda type of a data type

Parameters

dt

a GdaDictType object

 

Returns

the gda type


gda_dict_type_add_synonym ()

void
gda_dict_type_add_synonym (GdaDictType *dt,
                           const gchar *synonym);

Sets a new synonym to the dt data type.

Parameters

dt

a GdaDictType object

 

gda_dict_type_get_synonyms ()

const GSList *
gda_dict_type_get_synonyms (GdaDictType *dt);

Get a list of dt 's synonyms

Parameters

dt

a GdaDictType object

 

Returns

a list of strings which must not be modified


gda_dict_type_clear_synonyms ()

void
gda_dict_type_clear_synonyms (GdaDictType *dt);

Removes any synonym attached to dt

Parameters

dt

a GdaDictType object

 

Types and Values

GdaDictType

typedef struct _GdaDictType GdaDictType;