Re: prepare_cached() unused in selectall_arrayref() et al
- From: Tim.Bunce@xxxxxxxxx (Tim Bunce)
- Date: Sat, 17 Dec 2005 14:22:03 +0000
On Sat, Dec 17, 2005 at 01:19:30AM -0500, David Manura wrote:
> Why do the higher-level DBI methods such as selectall_arrayref()
> internally use prepare() rather than prepare_cached()? or at least why
> is there no option to enable that?
You can, in a way:
$sth = $dbh->prepare_cached($sql);
$data = $dbh->selectall_arrayref($sth);
or
$data = $dbh->selectall_arrayref( $dbh->prepare_cached($sql) );
> It seems that the only way to
> utilize DBI's internal statement handling caching is to directly call
> prepare_cached(), but managing that is not as convenient or transparent
> as just using the higher-level methods such as selectall_arrayref().
I think the options above strike a reasonable balance. (Especially as
you're the first person to ask about it here for a long time.)
Tim.
.
- References:
- prepare_cached() unused in selectall_arrayref() et al
- From: David Manura
- prepare_cached() unused in selectall_arrayref() et al
- Prev by Date: Re: prepare_cached() unused in selectall_arrayref() et al
- Next by Date: Re: DBD::Oracle & array interface
- Previous by thread: Re: prepare_cached() unused in selectall_arrayref() et al
- Index(es):
Relevant Pages
|