Re: [gnome-db] Defined column size.
- From: Vivien Malerba <vmalerba gmail com>
- To: bas driessen xobas com
- Cc: GNOME-DB List <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Defined column size.
- Date: Tue, 23 Jun 2009 08:59:20 +0200
2009/6/23 Bas Driessen
<bas driessen xobas com>
On Mon, 2009-06-22 at 15:09 +0200, Vivien Malerba wrote:
2009/6/22 Bas Driessen <bas driessen xobas com>
Hello,
Question. In V3 there was the quick and convenient function: "gda_column_get_defined_size" to get the width of a returned column from the database. This no longer exists. I believe the solution should be something along the lines of:
const GValue *value;
value = gda_column_get_attribute (column, GDA_ATTRIBUTE_DEFINED_SIZE)
This GDA_ATTRIBUTE_DEFINED_SIZE (or similar name) does not exist. What is the best/quickest way to get this value? If possible a small code sample, which often makes things easier to understand.
This feature was removed from the V4 because it was not reliable (I mean it worked in most cases but reported some wrong values sometimes).
The best way to do this is to query the meta data associated to the tables, ie get information about tables and columns. However, because it takes some time, it's better to cache the result, so you'll have to modify a bit your program's structure for this.
For an example about how to do this, please look at the samples/MetaStore/ example, and the documentation (http://library.gnome.org/devel/libgda/4.0/gda-dict.html) which also has an lenghty introduction about meta data (if you have any remark about the doc. let me know so I can correct it).
Understood. Will study the meta data structures. Thanks Vivien.
Ok, tell me if you have any problem...
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]