[Devel] Unification of str converter function in database modules

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Mar 6 18:16:17 CET 2007


Hi Henning,

yes, this will be usefull, especially when there are more plan regarding 
unification of DB types (STR versus STRING) - this difference makes 
usage of dbtext underlayer impossible for some modules.

to answer to your question - yes, make a new .h file in db/ and prefix 
all the function with db_ to avoid any overlapping. Also try to reuse as 
much as possible the functions from ut.h .

regards,
bogdan

Henning Westerholt wrote:
> Hi all,
>
> during my review of the source i noticed that the three db modules (mysql, 
> postgresql, unixodbc) each uses their own, slightly different string (char *) 
> converter functions. I tried to unified them into one implementation.
>
> I moved this functions into the db/db_val.c file, since there is also the 
> definition for the db_val type. But they conflict there with the functions in 
> ut.h with the same names, that convert "str" to other datatypes.
>
> What will be the best solution for this problem? Move them into another header 
> file? Rename them to eg. string2int to avoid further confusion? 
>
> Best regards,
>
> Henning
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>
>   




More information about the Devel mailing list