![]() |
![]() |
![]() |
GNOME Data Access 3.0 manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
GdaDictField; enum GdaDictFieldAttribute; GObject * gda_dict_field_new (GdaDict *dict
,GdaDictType *type
); void gda_dict_field_set_length (GdaDictField *field
,gint length
); gint gda_dict_field_get_length (GdaDictField *field
); void gda_dict_field_set_scale (GdaDictField *field
,gint length
); gint gda_dict_field_get_scale (GdaDictField *field
); GSList * gda_dict_field_get_constraints (GdaDictField *field
); void gda_dict_field_set_default_value (GdaDictField *field
,const GValue *value
); const GValue * gda_dict_field_get_default_value (GdaDictField *field
); gboolean gda_dict_field_is_null_allowed (GdaDictField *field
); gboolean gda_dict_field_is_pkey_part (GdaDictField *field
); gboolean gda_dict_field_is_pkey_alone (GdaDictField *field
); gboolean gda_dict_field_is_fkey_part (GdaDictField *field
); gboolean gda_dict_field_is_fkey_alone (GdaDictField *field
); void gda_dict_field_set_attributes (GdaDictField *field
,GdaDictFieldAttribute attributes
); GdaDictFieldAttribute gda_dict_field_get_attributes (GdaDictField *field
);
GObject * gda_dict_field_new (GdaDict *dict
,GdaDictType *type
);
Creates a new GdaDictField object
|
a GdaDict object |
|
a GdaDictType object (the field's type) |
Returns : |
the new object |
gint gda_dict_field_get_length (GdaDictField *field
);
Get the length of a field.
|
a GdaDictField object |
Returns : |
the size of the corresponding data type has a fixed size, or -1 |
gint gda_dict_field_get_scale (GdaDictField *field
);
Get the scale of a field.
|
a GdaDictField object |
Returns : |
the size of the corresponding data type has a fixed size, or -1 |
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
|
a GdaDictField object |
Returns : |
a new list of GdaDictConstraint objects |
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).
|
a GdaDictField object |
|
a GValue value or NULL |
const GValue * gda_dict_field_get_default_value (GdaDictField *field
);
Get the default value for the field if ne exists
|
a GdaDictField object |
Returns : |
the default value |
gboolean gda_dict_field_is_null_allowed (GdaDictField *field
);
Test if field
can be NULL
or not
|
a GdaDictField object |
gboolean gda_dict_field_is_pkey_part (GdaDictField *field
);
Test if field
is part of a primary key constraint
|
a GdaDictField object |
gboolean gda_dict_field_is_pkey_alone (GdaDictField *field
);
Test if field
is alone a primary key constraint
|
a GdaDictField object |
gboolean gda_dict_field_is_fkey_part (GdaDictField *field
);
Test if field
is part of a foreign key constraint
|
a GdaDictField object |
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.
|
a GdaDictField object |
Returns : |
the new attributes value |
void gda_dict_field_set_attributes (GdaDictField *field
,GdaDictFieldAttribute attributes
);
GdaDictFieldAttribute gda_dict_field_get_attributes (GdaDictField *field
);