Re: Data types mapping



Stephan Heinze wrote:

> On Mon, 24 Jan 2000 16:35:37 Rodrigo Moya wrote:
> > In fill_field_values(), for each field, I
> > now set
> > > the field->value->_d and the field->value->_u.
> > >
> [snip]
> > Yes, replace the line (in gda-postgres.c - GDA_Recordset_describe()
> > function):
> >
> > field->gdaType     = GDA_TypeVarchar;
> >
> > with
> >
> > field->gdaType = gda_postgres_sql2gdatype(server_field->sql_type);
>
> i have to do the job twice? there are type settings in each of the
> fields
> (value->_d) and also in server_field->gdaType.
>
> i'll use sql2gdatype in fill_fields too, but IMHO there should be a more
> elegant way ...
>
> *thinking*
>

I think it's better to put this on the GDA_Recordset_describe function
(gda-oraclesrv.c) since it is when it's really needed (when sending
recordset descriptions to the client).

Also, have a look at the postgres implementation of fill_field_values to
see which of the fileds in the GDA_Value union you must set, depending on
the GDA_Type.

Cheers



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