| Newsgroups |
gmane.comp.lang.perl.modules.dbi.sybase.devel |
| Message-ID |
<[email protected]> |
On Fri, Dec 21, 2012 at 01:23:19AM +0000, Rafael Kitover wrote:
> Greetings,
> I asked you this on irc but you disappeared.
Sorry about that. The [email protected] mailing list (CC'd) is the best
place to ask such questions.
> Currently I do this:
> my $sth = $dbh->prepare_cached(<<'EOF');
> SELECT …
> WHERE col = ?
> EOF
> my @data = $dbh->selectall_arrayref($sth, { Slice => {} }, @binds);
> I would like to do this:
> my @data = $dbh->selectall_arrayref(<<'EOF', { cached => 1, Slice => {} }, @binds);
> SELECT …
> WHERE col = ?
> EOF
> Alternately (for those who need it:)
> my @data = $dbh->selectall_arrayref(<<'EOF', { cached => { if_active => 3 }, Slice => {} }, @binds);
> SELECT …
> WHERE col = ?
> EOF
> Perhaps also allowing to set a default if_active.
> Would you accept a patch to DBI for this?
I'm not keen because it can be done using existing functionality::
my @data = $dbh->selectall_arrayref($dbh->prepare_cached(<<'EOF'), { Slice => {} }, @binds);
SELECT …
WHERE col = ?
EOF
Tim.