|
From: Markus H. <mar...@mh...> - 2011-04-27 07:32:31
|
Toby Thain <to...@te...> was heard to say: >> I have time pressure on my current project, and getting the milliseconds >> is not crucial, so I can forward now with a time_t. After that, I would >> like to look deeper at libDBI and create patches to return any value as >> a string representation. Would that be a good idea? >> >> Holger >> Hi, seems I've missed the start of this thread, so please excuse me for jumping in late. Please have a look at the current CVS revision. We do have the following functions here: /* get_as* functions */ long long dbi_result_get_as_longlong(dbi_result Result, const char *fieldname); long long dbi_result_get_as_longlong_idx(dbi_result Result, unsigned int fieldidx); char *dbi_result_get_as_string_copy(dbi_result Result, const char *fieldname); char *dbi_result_get_as_string_copy_idx(dbi_result Result, unsigned int fieldidx); They do pretty much of what was asked for. I can't recall the details atm, but the first two functions try hard to return an integer representation of whatever was stored in the column, and the remaining two functions return a string representation. You might give that a try and see if you can get your TIMESTAMP data in a useful form. If not, feel free to submit specific patches that implement the missing functionality. Once again, I have to apologize that I won't be able to take care of the release process for another month or two due to time constraints. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |