At 5:42 PM +0200 8/10/04, H.Merijn Brand wrote:
Unsure if this is the right spot, but in writing the DBD I found the
unidirection from handle to handle quite restrictive.

Statement handles know what database handle they belong to, but database
handles don't know what statement handles are opened on them.

Will this be somehow addressed in DBI-2?
Currently I have the feeling I have to jump through hoops to have these
relations registered in the DBD, which I need to workaround database design
errors (NOT DBI errors!)

I think that solving the matter of a parent handle knowing what its child handles are was mentioned in Tim's road map. Here it is:


        * Currently is it not possible to discover all the child statement
handles that belong to a database handle (or all database handles
that belong to a driver handle).  This makes certain tasks more
difficult, especially some debugging scenarios.  A cache of
weak-references to child handles would solve the problem without
creating reference loops.

For my part, I had implemented this knowledge in Rosetta, but that currently uses circular references that need explicit destruction (which is done by my equivalent of disconnect() or finalize(), etc).

FYI, I see the main advantage of weakrefs being for people that simply let their handles go out of scope rather than explicitly destroying/closing them. Which is fine, since that is often seen as "the Perl way".

-- Darren Duncan

Reply via email to