Re: [gnome-db] gda_data_model_describe_column



On Wed, 10 Nov 2004 10:24:14 +0100, Vivien Malerba <vmalerba gmail com> wrote:

> Personnaly I believe that there is too much information in that
> structure: we are mixing database schema information with resultset
> information; the database schema information can be retreived using
> the specific schema information already provided by libgda.

Well than, in that case, there's no need to have it here as well. In fact, it
just confused me: I didn't even realize the information was available
from somewhere else (where?). It will confuse others as well if we
keep it the way it is.

> I and would limit down to the same kind of information for the JDBC
> ResultSetMetaData interface (see
> http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html),
> it would then become:
> 
> struct GdaFieldAttributes {
>        // name and position
>        gchar *name;
>        gchar *label;
>        gint position;
> 
>        // data type
>        GdaValueType gda_type;
>        gchar *dbms_type;                   <-- Real DBMS type name for
> the column
>        gint precision;
>        gint scale;
> 
>        // optionnal
>        gboolean allow_null;
>        gboolean auto_increment;
>        gchar *table_name;              <-- need to define exactely
> when it is filled and what it means; I doubt its utility.

Would be better to point directly to the attribute value:

          GdaAttribute *attribute;

(so we can get at its type for instance). Then attribute->table could
point to the
parent table, and if we really care about the name then attribute->table->name
would do it.

> };

> 
> Maybe renaming that to GdaDataColumnAttributes would make its purpose
> clear and without ambiguities.

Yes please (or even GdaColumnAttrs to save us some typing!)

Best Regards,

Neil



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