Top | ![]() |
![]() |
![]() |
![]() |
GObject * | gda_dict_field_new () |
void | gda_dict_field_set_length () |
gint | gda_dict_field_get_length () |
void | gda_dict_field_set_scale () |
gint | gda_dict_field_get_scale () |
GSList * | gda_dict_field_get_constraints () |
void | gda_dict_field_set_default_value () |
const GValue * | gda_dict_field_get_default_value () |
gboolean | gda_dict_field_is_null_allowed () |
gboolean | gda_dict_field_is_pkey_part () |
gboolean | gda_dict_field_is_pkey_alone () |
gboolean | gda_dict_field_is_fkey_part () |
gboolean | gda_dict_field_is_fkey_alone () |
void | gda_dict_field_set_attributes () |
GdaDictFieldAttribute | gda_dict_field_get_attributes () |
GObject * gda_dict_field_new (GdaDict *dict
,GdaDictType *type
);
Creates a new GdaDictField object
gint
gda_dict_field_get_length (GdaDictField *field
);
Get the length of a field.
gint
gda_dict_field_get_scale (GdaDictField *field
);
Get the scale of a field.
GSList *
gda_dict_field_get_constraints (GdaDictField *field
);
Get all the constraints which affect the given field. Constraints are of several type: NOT NULL, primary key, foreign key, check constrains
void gda_dict_field_set_default_value (GdaDictField *field
,const GValue *value
);
Sets (or replace) the default value for the field. WARNING: the default value's data type can be different from the field's data type (this is the case for example if the default value is a function like Postgres's default value for the SERIAL data type).
const GValue *
gda_dict_field_get_default_value (GdaDictField *field
);
Get the default value for the field if ne exists
gboolean
gda_dict_field_is_null_allowed (GdaDictField *field
);
Test if field
can be NULL
or not
gboolean
gda_dict_field_is_pkey_part (GdaDictField *field
);
Test if field
is part of a primary key constraint
gboolean
gda_dict_field_is_pkey_alone (GdaDictField *field
);
Test if field
is alone a primary key constraint
gboolean
gda_dict_field_is_fkey_part (GdaDictField *field
);
Test if field
is part of a foreign key constraint
gboolean
gda_dict_field_is_fkey_alone (GdaDictField *field
);
Get field
's extra attributes. The attributes
is an OR'ed value of all the possible
values in GdaDictFieldAttribute.
void gda_dict_field_set_attributes (GdaDictField *field
,GdaDictFieldAttribute attributes
);
GdaDictFieldAttribute
gda_dict_field_get_attributes (GdaDictField *field
);