apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: Column names with apr_dbd
Date Tue, 14 Feb 2006 09:09:15 GMT
On Mon, 2006-02-13 at 19:54 +0000, Nick Kew wrote:

> It'll have to wait for 1.3, 'cos it affects the API (despite not breaking 
> anything:-)

Actually, it just occurred to me that we could do this in a completely
backward compatible manner, with (admittedly) somewhat ugly approach. We
could modify apr_dbd_get_entry to allow negative numbers (col is signed
int, so this should not be a problem), where -1 means "get the name of
the first column" and so on.

So, for APR 1.2.x, pseudo code would be (inside get_entry):

if (col < 0)
  get_name(get_result_from_row(row), -col - 1);

The driver structure would not expose get_name function until 1.3, of
course, so everything would remain OK for inclusion in 1.2.x. Would this
be something APR committers would be willing to entertain?


View raw message