## GdaDataModelIndex GdaDataModelIndex — Management of GdaDataModel indexes |

## Synopsis

                GdaDataModelIndex;
    #define     GDA_TYPE_DATA_MODEL_INDEX
    GType       gda_data_model_index_get_type   (void);
    GdaDataModelIndex* gda_data_model_index_new (void);
    GdaDataModelIndex* gda_data_model_index_copy
                                                (GdaDataModelIndex *dmi);
    void        gda_data_model_index_free       (GdaDataModelIndex *dmi);
    gboolean    gda_data_model_index_equal      (const GdaDataModelIndex *lhs,
                                                 const GdaDataModelIndex *rhs);
    const gchar* gda_data_model_index_get_name  (GdaDataModelIndex *dmi);
    void        gda_data_model_index_set_name   (GdaDataModelIndex *dmi,
                                                 const gchar *name);
    const gchar* gda_data_model_index_get_table_name
                                                (GdaDataModelIndex *dmi);
    void        gda_data_model_index_set_table_name
                                                (GdaDataModelIndex *dmi,
                                                 const gchar *name);
    gboolean    gda_data_model_index_get_primary_key
                                                (GdaDataModelIndex *dmi);
    void        gda_data_model_index_set_primary_key
                                                (GdaDataModelIndex *dmi,
                                                 gboolean pk);
    gboolean    gda_data_model_index_get_unique_key
                                                (GdaDataModelIndex *dmi);
    void        gda_data_model_index_set_unique_key
                                                (GdaDataModelIndex *dmi,
                                                 gboolean uk);
    const gchar* gda_data_model_index_get_references
                                                (GdaDataModelIndex *dmi);
    void        gda_data_model_index_set_references
                                                (GdaDataModelIndex *dmi,
                                                 const gchar *ref);
    GList*      gda_data_model_index_get_column_index_list
                                                (GdaDataModelIndex *dmi);
    void        gda_data_model_index_set_column_index_list
                                                (GdaDataModelIndex *dmi,
                                                 GList *col_idx_list);

## Description

## Details

### GdaDataModelIndex

    typedef struct {
    	gchar *name;
    	gchar *table_name;
    	gboolean primary_key;
    	gboolean unique_key;
    	gchar *references;
    	GList *col_idx_list;
    } GdaDataModelIndex;

### GDA_TYPE_DATA_MODEL_INDEX

    #define GDA_TYPE_DATA_MODEL_INDEX (gda_data_model_index_get_type ())

### gda_data_model_index_get_type ()

    GType       gda_data_model_index_get_type   (void);

Returns : |

### gda_data_model_index_new ()

    GdaDataModelIndex* gda_data_model_index_new (void);

Returns : | a newly allocated GdaDataModelIndex object.

### gda_data_model_index_copy ()

    GdaDataModelIndex* gda_data_model_index_copy
                                                (GdaDataModelIndex *dmi);

Creates a new GdaDataModelIndex object from an existing one.

`dmi` : | attributes to get a copy from.
Returns : | a newly allocated GdaDataModelIndex with a copy of the data in `dmi`.

### gda_data_model_index_free ()

    void        gda_data_model_index_free       (GdaDataModelIndex *dmi);

`dmi` : |

### gda_data_model_index_equal ()

    gboolean    gda_data_model_index_equal      (const GdaDataModelIndex *lhs,
                                                 const GdaDataModelIndex *rhs);

Tests whether two field attributes are equal.

`lhs` : | a GdaDataModelIndex
`rhs` : | another GdaDataModelIndex
Returns : | `TRUE` if the field attributes contain the same information.

### gda_data_model_index_get_name ()

    const gchar* gda_data_model_index_get_name  (GdaDataModelIndex *dmi);

`dmi` : | a GdaDataModelIndex.
Returns : | the name of `dmi`.

### gda_data_model_index_set_name ()

    void        gda_data_model_index_set_name   (GdaDataModelIndex *dmi,
                                                 const gchar *name);

Sets the name of `dmi` to `name`.

`dmi` : | a GdaDataModelIndex.
`name` : | the new name of `dmi`.

### gda_data_model_index_get_table_name ()

    const gchar* gda_data_model_index_get_table_name
                                                (GdaDataModelIndex *dmi);

`dmi` : | a GdaDataModelIndex.
Returns : | the table name of `dmi`.

### gda_data_model_index_set_table_name ()

    void        gda_data_model_index_set_table_name
                                                (GdaDataModelIndex *dmi,
                                                 const gchar *name);

Sets the table name of `dmi` to `table_name`.

`dmi` : | a GdaDataModelIndex.
`name` : | the new name of `dmi`.

### gda_data_model_index_get_primary_key ()

    gboolean    gda_data_model_index_get_primary_key
                                                (GdaDataModelIndex *dmi);

`dmi` : | a `GdaDataModelIndex`.
Returns : | TRUE if primary key.

### gda_data_model_index_set_primary_key ()

    void        gda_data_model_index_set_primary_key
                                                (GdaDataModelIndex *dmi,
                                                 gboolean pk);

Sets if a GdaDataModelIndex is a primary key.

`dmi` : | a GdaDataModelIndex.
`pk` : | the new primary key setting of `dmi`.

### gda_data_model_index_get_unique_key ()

    gboolean    gda_data_model_index_get_unique_key
                                                (GdaDataModelIndex *dmi);

`dmi` : | a `GdaDataModelIndex`.
Returns : | TRUE if unique key.

### gda_data_model_index_set_unique_key ()

    void        gda_data_model_index_set_unique_key
                                                (GdaDataModelIndex *dmi,
                                                 gboolean uk);

Sets if a GdaDataModelIndex is a unique key.

`dmi` : | a GdaDataModelIndex.
`uk` : | the new primary key setting of `dmi`.

### gda_data_model_index_get_references ()

    const gchar* gda_data_model_index_get_references
                                                (GdaDataModelIndex *dmi);

`dmi` : | a GdaDataModelIndex.
Returns : | `dmi`'s references.

### gda_data_model_index_set_references ()

    void        gda_data_model_index_set_references
                                                (GdaDataModelIndex *dmi,
                                                 const gchar *ref);

Sets `dmi`'s `references`.

`dmi` : | a GdaDataModelIndex.
`ref` : | references.

### gda_data_model_index_get_column_index_list ()

    GList*      gda_data_model_index_get_column_index_list
                                                (GdaDataModelIndex *dmi);

`dmi` : | a GdaDataModelIndex.
Returns : | `dmi`'s list of GdaColumnIndex.

### gda_data_model_index_set_column_index_list ()

    void        gda_data_model_index_set_column_index_list
                                                (GdaDataModelIndex *dmi,
                                                 GList *col_idx_list);

Sets `dmi`'s list of column index attributes by copying `col_idx_list` to its internal representation.

`dmi` : | a GdaDataModelIndex.
`col_idx_list` : | list of GdaColumnIndex.