On Tue, Jan 01, 2002 at 09:09:11PM -0500, Matthew O. Persico wrote:
> Tim Bunce wrote:
> 
> > I'm pondering deprecating prepare_cached() in favor of requesting a
> > cached prepare() by passing the $statement as a reference to a string.
> > 
> > A big plus from this would be that $dbh->do(\$statement) would then
> > also be defined to do a prepare_cached().
> > 
> > Any comments?
> > 
> > Tim.
> > 
> > 
> 
> Why not be explicit:

Ug, yes.  Ignore my previous message, it was a total thinko based
on some old ideas long since discarded but left lying around in the
ToDo to catch me out when posting late at night :)

>       $dbh->prepare (sql => "select yada yada yada", cache => 1);
> 
> so that when you want to add more bells and whistles, it is easy to do so?

Yes, using attributes was the (temporarily forgotten) plan.

This'll be needed when preparse() is introduced he prepare call flow.
Also I'm pondering allowing external code to handle the cache to
enable LRU cache size limiting etc.

It will mean that drivers will have to delete their own prepare()
code and replace it with something like a $sth->_prepare method
that the DBI's own new $dbh->prepare() code will call.

Old drivers just won't get the new functionality.

Tim.

Reply via email to