[gnome-db] gda_data_model_describe_column



What's the point of this method: ?

GdaFieldAttributes* gda_data_model_describe_column
                                            (GdaDataModel *model,
                                             gint col);

Or rahter, what's the point of returning this?

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;
};

Can we change this struct. What does "gboolean unique_key;" mean? Does it mean
the column by itself is a unique key? Make that boolean a pointer to a structure
containing all unique key structures in which the given column participates. It
would make more sense? A table can have more than one unique key
composed of more than one field. Then again, struct GdaFieldAttributes
is undocumented so it's hard to make sense of it right now. Anyways,
please change it, cause it doesn't seem right. Do this:

struct GdaFieldAttributes {

	gint defined_size;
	gchar *name;
	gchar *table;
	gchar *caption;
	gint scale;
	GdaValueType gda_type;
	gboolean allow_null;
	GdaPrimaryKey *primary_key;
	GdaUniqueKeys **unique_keys;
	GdaReferences **references;
	gboolean auto_increment;
	glong auto_increment_start;
	glong auto_increment_step;
	gint position;
	GdaValue *default_value;
};

Now it's starting to look reasonable...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]