Dominik Faessler <[EMAIL PROTECTED]> said:

> Aaron Stone wrote:
> 
>>Is this in place of using a for loop? It would work, but there might be
>>some code where memory allocations or other logic occurs on the basis of
>>the number of rows that were found. Just keep an eye out for such things.
>>
> I've seen the code fragments, where memory allocation occurs. If it was
> necessary to know the db_num_rows, I inserted a 'select count(*)'
> statement, but with libdbi, i can use 'dbi_result_get_numrows' instead.

I've read that 'select count(*)...' is faster only if you aren't then
selecting all of the rows two lines later, in which case there's no
benefit. Which is to say, there won't be any drawback to eliminating our
use of num_rows() style functions, except gnarlier code in those places
:-\

>>There was a SQL intermediary library that we had been looking at a few
>>weeks ago, and if it already has Firebird support, your efforts would be
>>better spent writing a DBMail interface to that common backend:
>>
>>http://libdbi.sourceforge.net/
>>
> I read the documentation and examples for libdbi and think it wouldn't be
> all-too difficult to change the db-interface.

As it turns out, libdbi doesn't have support for Firebird. So:

- You can write the Firebird driver for libdbi,
  and we can write the libdbi driver for DBMail or...

- You can write the Firebird driver for DBMail.


> I checked out 'dbmail' from cvs-system and be in progress to change
> db-interface. Can I add a param 'driverdir' and 'driver' in 'db_param_t'
> for configuring the database-driver? If 'driverdir' is NULL then
> DBI_DRIVER_DIR would be used (compiled in libdbi).

We're looking to make the database backends loadable. There hasn't been
much discussion yet specifically about how to do this, so feel free to
pick any method you'd like, but be prepared for it to change once it is
discussed on the mailing list and we come to a decision about what to do.
 
> I would also spend time to make tablenames configurable (in TODO). Should
> I create a struct 'db_tables_t' or add all 11 tableconfigs in
> 'db_param_t'?
>
> Are you generally agree that I help you? Or would you do it yourself? I
> would do it, if you allow me.

You are more than welcome to post code to the mailing list. If it works
and fits into the 2.1 development agenda, we'll be glad to accept it!


Aaron

-- 



Reply via email to