-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(DBD metadata)
>> Could get_info be expanded to include this?

Dean Arnold wrote:
> Seems the proper place for it...

Cool. Maybe we can come up with a list of metadata? This is certainly
something that we can do in DBI 1.

> Or, it gives us the opportunity to coax people to upgrade
> their perl versions ;^). And of course, just cuz its CORE, doesn't
> preclude interim updates.

True, but DBI changes must faster than Perl, and upgrading Perl will
affect a lot of other things. Maybe we should have the DBD drivers
start adding "require DBI 1.48" to the top of their modules. :)

> Does $sth->bind_param(1, undef, { TYPE => SQL_VARCHAR });
> not work for your case ?

Sure, it works, but that undef (and the TYPE) is ugly, and it forces the
underlying code to go through an actual assignment of the placeholder, only
to subsequently throw it out when I execute with specific values. I
want to *only* set the placeholder type, and throw the values in later:

$sth = $dbh->prepare("SELECT subject FROM email WHERE rdate >= :rdate
AND whofrom = :from AND folder = :folder");
$sth->bind_params({rdate => SQL_TIMESTAMP});
## or
$sth->bind_params(SQL_TIMESTAMP, SQL_VARCHAR, SQL_INTEGER);
$sth->execute($sometime,$somebody,$somewhere);

> bind_param_all() or some such does sound like a nice idea...
> and/or an lvalue'd $sth method ? ie, just assigning values

Yes, perhaps something like:
my %knownvals = (rdate => $sometime, folder => $somewhere);
$sth->bind_values(\%knownvals);
SOMELOOP: {
        $sth->execute($somebody);
}

>> $info = $sth->fetchall_arrayref({});

> Not certain thats solvable. Assuming Perl6 is still 'TMTOWTDI',
> some ability to provide explicit differentiation is probably needed,
> tho I spose some wantarray tests might help reduce the number of i/f's.
> (albeit at the price of possible confusion).

True, but at the very least I'd like to see that particular idiom
(which I use quite a lot) better documented, and perhaps become more
of a default.

- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200507080739
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCzmbmvJuQZxSWSsgRAueDAJ9ZzDnG+k5YYhFWHYwdSy4iXxBs1QCdFC5n
Kx135nE7mifEX9de3KGcsLw=
=7OSl
-----END PGP SIGNATURE-----


Reply via email to