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:

        $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? This would also enable:

        $dbh->prepare (sql => "select yada yada yada",
                 cache => 0);
  and
        $dbh->prepare (sql => "select yada yada yada",
                        cache => $determined_dynamically_elsewhere);

Let
        prepare ("select yada yada yada")

be, as now, uncached.

-- 
Matthew O. Persico

Reply via email to