## GdaDataModel columns GdaDataModel columns — Management of GdaDataModel column attributes |

## Synopsis

                GdaColumn;
                GdaColumn;
    GType       gda_column_get_type             (void);
    GdaColumn*  gda_column_new                  (void);
    GdaColumn*  gda_column_copy                 (GdaColumn *column);
    gboolean    gda_column_equal                (const GdaColumn *lhs,
                                                 const GdaColumn *rhs);
    glong       gda_column_get_defined_size     (GdaColumn *column);
    void        gda_column_set_defined_size     (GdaColumn *column,
                                                 glong size);
    const gchar* gda_column_get_title           (GdaColumn *column);
    void        gda_column_set_title            (GdaColumn *column,
                                                 const gchar *title);
    const gchar* gda_column_get_name            (GdaColumn *column);
    void        gda_column_set_name             (GdaColumn *column,
                                                 const gchar *name);
    const gchar* gda_column_get_table           (GdaColumn *column);
    void        gda_column_set_table            (GdaColumn *column,
                                                 const gchar *table);
    const gchar* gda_column_get_caption         (GdaColumn *column);
    void        gda_column_set_caption          (GdaColumn *column,
                                                 const gchar *caption);
    glong       gda_column_get_scale            (GdaColumn *column);
    void        gda_column_set_scale            (GdaColumn *column,
                                                 glong scale);
    GdaValueType gda_column_get_gdatype         (GdaColumn *column);
    void        gda_column_set_gdatype          (GdaColumn *column,
                                                 GdaValueType type);
    gboolean    gda_column_get_allow_null       (GdaColumn *column);
    void        gda_column_set_allow_null       (GdaColumn *column,
                                                 gboolean allow);
    gboolean    gda_column_get_primary_key      (GdaColumn *column);
    void        gda_column_set_primary_key      (GdaColumn *column,
                                                 gboolean pk);
    gboolean    gda_column_get_unique_key       (GdaColumn *column);
    void        gda_column_set_unique_key       (GdaColumn *column,
                                                 gboolean uk);
    const gchar* gda_column_get_references      (GdaColumn *column);
    void        gda_column_set_references       (GdaColumn *column,
                                                 const gchar *ref);
    gboolean    gda_column_get_auto_increment   (GdaColumn *column);
    void        gda_column_set_auto_increment   (GdaColumn *column,
                                                 gboolean is_auto);
    gint        gda_column_get_position         (GdaColumn *column);
    void        gda_column_set_position         (GdaColumn *column,
                                                 gint position);
    const GdaValue* gda_column_get_default_value
                                                (GdaColumn *column);
    void        gda_column_set_default_value    (GdaColumn *column,
                                                 const GdaValue *default_value);

## Object Hierarchy

      GObject
       +----GdaColumn

      GObject
       +----GdaColumn

## Signals

    "gda-type-changed"
                void        user_function      (GdaColumn *gdacolumn,
                                                gint arg1,
                                                gint arg2,
                                                gpointer user_data);
    "name-changed"
                void        user_function      (GdaColumn *gdacolumn,
                                                gchar *arg1,
                                                gpointer user_data);
    "gda-type-changed"
                void        user_function      (GdaColumn *gdacolumn,
                                                gint arg1,
                                                gint arg2,
                                                gpointer user_data);
    "name-changed"
                void        user_function      (GdaColumn *gdacolumn,
                                                gchar *arg1,
                                                gpointer user_data);

## Description

## Details

### GdaColumn

    typedef struct _GdaColumn GdaColumn;

### GdaColumn

    typedef struct _GdaColumn GdaColumn;

### gda_column_get_type ()

    GType       gda_column_get_type             (void);

Returns : |

### gda_column_new ()

    GdaColumn*  gda_column_new                  (void);

Returns : | a newly allocated GdaColumn object.

### gda_column_copy ()

    GdaColumn*  gda_column_copy                 (GdaColumn *column);

Creates a new GdaColumn object from an existing one.

`column` : | column to get a copy from.
Returns : | a newly allocated GdaColumn with a copy of the data in `column`.

### gda_column_equal ()

    gboolean    gda_column_equal                (const GdaColumn *lhs,
                                                 const GdaColumn *rhs);

Tests whether two colums are equal.

`lhs` : | a GdaColumn
`rhs` : | another GdaColumn
Returns : | `TRUE` if the columns contain the same information.

### gda_column_get_defined_size ()

    glong       gda_column_get_defined_size     (GdaColumn *column);

`column` : | a `GdaColumn`.
Returns : | the defined size of `column`.

### gda_column_set_defined_size ()

    void        gda_column_set_defined_size     (GdaColumn *column,
                                                 glong size);

Sets the defined size of a GdaColumn.

`column` : | a GdaColumn.
`size` : | the defined size we want to set.

### gda_column_get_title ()

    const gchar* gda_column_get_title           (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | the column's title

### gda_column_set_title ()

    void        gda_column_set_title            (GdaColumn *column,
                                                 const gchar *title);

Sets the column's title

`column` : | a GdaColumn.
`title` : | title name.

### gda_column_get_name ()

    const gchar* gda_column_get_name            (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | the name of `column`.

### gda_column_set_name ()

    void        gda_column_set_name             (GdaColumn *column,
                                                 const gchar *name);

Sets the name of `column` to `name`.

`column` : | a GdaColumn.
`name` : | the new name of `column`.

### gda_column_get_table ()

    const gchar* gda_column_get_table           (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | the name of the table to which this column belongs.

### gda_column_set_table ()

    void        gda_column_set_table            (GdaColumn *column,
                                                 const gchar *table);

Sets the name of the table to which the given column belongs.

`column` : | a GdaColumn.
`table` : | table name.

### gda_column_get_caption ()

    const gchar* gda_column_get_caption         (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | `column`'s caption.

### gda_column_set_caption ()

    void        gda_column_set_caption          (GdaColumn *column,
                                                 const gchar *caption);

Sets `column`'s `caption`.

`column` : | a GdaColumn.
`caption` : | caption.

### gda_column_get_scale ()

    glong       gda_column_get_scale            (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | the number of decimals of `column`.

### gda_column_set_scale ()

    void        gda_column_set_scale            (GdaColumn *column,
                                                 glong scale);

Sets the scale of `column` to `scale`.

`column` : | a GdaColumn.
`scale` : | number of decimals.

### gda_column_get_gdatype ()

    GdaValueType gda_column_get_gdatype         (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | the type of `column`.

### gda_column_set_gdatype ()

    void        gda_column_set_gdatype          (GdaColumn *column,
                                                 GdaValueType type);

Sets the type of `column` to `type`.

`column` : | a GdaColumn.
`type` : | the new type of `column`.

### gda_column_get_allow_null ()

    gboolean    gda_column_get_allow_null       (GdaColumn *column);

Gets the 'allow null' flag of the given column.

`column` : | a GdaColumn.
Returns : | whether the given column allows null values or not (`TRUE` or `FALSE`).

### gda_column_set_allow_null ()

    void        gda_column_set_allow_null       (GdaColumn *column,
                                                 gboolean allow);

Sets the 'allow null' flag of the given column.

`column` : | a GdaColumn.
`allow` : | whether the given column should allows null values or not.

### gda_column_get_primary_key ()

    gboolean    gda_column_get_primary_key      (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | whether if the given column is a primary key (`TRUE` or `FALSE`).

### gda_column_set_primary_key ()

    void        gda_column_set_primary_key      (GdaColumn *column,
                                                 gboolean pk);

Sets the 'primary key' flag of the given column.

`column` : | a GdaColumn.
`pk` : | whether if the given column should be a primary key.

### gda_column_get_unique_key ()

    gboolean    gda_column_get_unique_key       (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | whether if the given column is an unique key (`TRUE` or `FALSE`).

### gda_column_set_unique_key ()

    void        gda_column_set_unique_key       (GdaColumn *column,
                                                 gboolean uk);

Sets the 'unique key' flag of the given column.

`column` : | a GdaColumn.
`uk` : | whether if the given column should be an unique key.

### gda_column_get_references ()

    const gchar* gda_column_get_references      (GdaColumn *column);

Reference is returned in tablename.fieldname format. Do not free this variable, it is used internally within GdaColumn.

`column` : | a GdaColumn.
Returns : | `column`'s references.

### gda_column_set_references ()

    void        gda_column_set_references       (GdaColumn *column,
                                                 const gchar *ref);

Sets `column`'s `references`.

`column` : | a GdaColumn.
`ref` : | references.

### gda_column_get_auto_increment ()

    gboolean    gda_column_get_auto_increment   (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | whether the given column is an auto incremented one (`TRUE` or `FALSE`).

### gda_column_set_auto_increment ()

    void        gda_column_set_auto_increment   (GdaColumn *column,
                                                 gboolean is_auto);

Sets the auto increment flag for the given column.

`column` : | a GdaColumn.
`is_auto` : | auto increment status.

### gda_column_get_position ()

    gint        gda_column_get_position         (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | the position of the column refer to in the containing data model.

### gda_column_set_position ()

    void        gda_column_set_position         (GdaColumn *column,
                                                 gint position);

Sets the position of the column refer to in the containing data model.

`column` : | a GdaColumn.
`position` : | the wanted position of the column in the containing data model.

### gda_column_get_default_value ()

    const GdaValue* gda_column_get_default_value
                                                (GdaColumn *column);

`column` : | a GdaColumn.
Returns : | `column`'s default value, as a GdaValue object.

### gda_column_set_default_value ()

    void        gda_column_set_default_value    (GdaColumn *column,
                                                 const GdaValue *default_value);

Sets `column`'s default GdaValue.

`column` : | a GdaColumn.
`default_value` : | default GdaValue for the column

## Signal Details

### The "gda-type-changed" signal

    void        user_function                  (GdaColumn *gdacolumn,
                                                gint arg1,
                                                gint arg2,
                                                gpointer user_data);

@: @: @:

### The "name-changed" signal

    void        user_function                  (GdaColumn *gdacolumn,
                                                gchar *arg1,
                                                gpointer user_data);

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

### The "gda-type-changed" signal

    void        user_function                  (GdaColumn *gdacolumn,
                                                gint arg1,
                                                gint arg2,
                                                gpointer user_data);

@: @: @:

### The "name-changed" signal

    void        user_function                  (GdaColumn *gdacolumn,
                                                gchar *arg1,
                                                gpointer user_data);

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