Re: [gnome-db] Prepared Statements



On Sun, 2003-04-27 at 14:39, Xabier Rodríguez Calvar wrote:
> El Viernes, 25 de Abril de 2003 01:50, Rodrigo Moya escribió:
> > > 	I was thinking about the API for prepared statements because when
> > > you create a new GdaParameter you have to specify the GdaValueType and I
> > > don'k understand why.
> >
> > because providers need to know what a parameter's type is, to be able to
> > know what to do with the associated value.
> 
> > > gda_parameter_new(), so my idea is that gda_paramenter_new() could get
> > > the real type calling gda_value_get_type().
> >
> > I think what you want is a gda_parameter_new_from_value, am I right? If
> > so, we can add it if you want.
> >
> > Although, to create parameters, as with values, you should be using the
> > _new_string, new_gobject and the (missing) _new_integer, etc...
> 
> 	My idea is to remove the gda_parameter_new()
>
yeah, that sounds reasonable.

>  and put the 
> gda_parameter_new_from_value()	, because is it possible to create a 
> GdaParameter without setting a GdaValue?
>
it shouldn't be possible. The GdaParameter contains a GdaValue, which it
creates when creating the parameter itself.

And I think we still shouldn't allow that, so that, if you want to
create a parameter, it has to have an associated type, always.

If you want to provide a patch for this, go ahead :-)

cheers




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