Top | ![]() |
![]() |
![]() |
![]() |
GdaFieldAttributes *
gda_field_attributes_copy (GdaFieldAttributes *fa
);
Creates a new GdaFieldAttributes object from an existing one.
void
gda_field_attributes_free (GdaFieldAttributes *fa
);
Deallocates all memory associated to the given GdaFieldAttributes object.
gboolean gda_field_attributes_equal (const GdaFieldAttributes *lhs
,const GdaFieldAttributes *rhs
);
Tests whether two field attributes are equal.
glong
gda_field_attributes_get_defined_size (GdaFieldAttributes *fa
);
void gda_field_attributes_set_defined_size (GdaFieldAttributes *fa
,glong size
);
Sets the defined size of a GdaFieldAttributes.
const gchar *
gda_field_attributes_get_name (GdaFieldAttributes *fa
);
void gda_field_attributes_set_name (GdaFieldAttributes *fa
,const gchar *name
);
Sets the name of fa
to name
.
const gchar *
gda_field_attributes_get_table (GdaFieldAttributes *fa
);
void gda_field_attributes_set_table (GdaFieldAttributes *fa
,const gchar *table
);
Sets the name of the table to which the given field belongs.
const gchar *
gda_field_attributes_get_caption (GdaFieldAttributes *fa
);
void gda_field_attributes_set_caption (GdaFieldAttributes *fa
,const gchar *caption
);
Sets fa
's caption
.
void gda_field_attributes_set_scale (GdaFieldAttributes *fa
,glong scale
);
Sets the scale of fa
to scale
.
GdaValueType
gda_field_attributes_get_gdatype (GdaFieldAttributes *fa
);
void gda_field_attributes_set_gdatype (GdaFieldAttributes *fa
,GdaValueType type
);
Sets the type of fa
to type
.
gboolean
gda_field_attributes_get_allow_null (GdaFieldAttributes *fa
);
Gets the 'allow null' flag of the given field attributes.
void gda_field_attributes_set_allow_null (GdaFieldAttributes *fa
,gboolean allow
);
Sets the 'allow null' flag of the given field attributes.
gboolean
gda_field_attributes_get_primary_key (GdaFieldAttributes *fa
);
void gda_field_attributes_set_primary_key (GdaFieldAttributes *fa
,gboolean pk
);
Sets the 'primary key' flag of the given field attributes.
gboolean
gda_field_attributes_get_unique_key (GdaFieldAttributes *fa
);
void gda_field_attributes_set_unique_key (GdaFieldAttributes *fa
,gboolean uk
);
Sets the 'unique key' flag of the given field attributes.
const gchar *
gda_field_attributes_get_references (GdaFieldAttributes *fa
);
void gda_field_attributes_set_references (GdaFieldAttributes *fa
,const gchar *ref
);
Sets fa
's references
.
gboolean
gda_field_attributes_get_auto_increment
(GdaFieldAttributes *fa
);
void gda_field_attributes_set_auto_increment (GdaFieldAttributes *fa
,gboolean is_auto
);
Sets the auto increment flag for the given field.
gint
gda_field_attributes_get_position (GdaFieldAttributes *fa
);
void gda_field_attributes_set_position (GdaFieldAttributes *fa
,gint position
);
Sets the position of the field the attributes refer to in the containing data model.
const GdaValue *
gda_field_attributes_get_default_value
(GdaFieldAttributes *fa
);
void gda_field_attributes_set_default_value (GdaFieldAttributes *fa
,const GdaValue *default_value
);
Sets fa
's default GdaValue.
struct GdaFieldAttributes { gint defined_size; gchar *name; gchar *table; gchar *caption; gint scale; GdaValueType gda_type; gboolean allow_null; gboolean primary_key; gboolean unique_key; gchar *references; gboolean auto_increment; glong auto_increment_start; glong auto_increment_step; gint position; GdaValue *default_value; };
typedef struct { gint actual_size; GdaValue *value; GdaFieldAttributes *attributes; } GdaField;