-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I suspect that other databases have similar APIs, and that
> access to these APIs might be useful as a general case.
> ...
> Obviously the driver (or DBI) would have to recognize the
> BULK INSERT statement and switch to the bulk load API
It could be useful, if it was kept generic enough. Overloading
prepare and using specific SQL would not be a good way to do
it, but perhaps some sort of other handle method:
my $bulkh = $dbh->bulkload
(
catalog => undef,
schema => undef,
table => $tablename,
columns => [EMAIL PROTECTED],
driverspecific => attribshere,
);
for my $rowinfo (@myrows) {
$bulkh->execute($rowinfo); ## e.g. an arrayref
}
$bulkh->finish();
$bulkh could be a normal statement handle with a boolean flag to
let the drivers know it was special. Drivers that do not support
bulkloading could just transform it into a normal INSERT.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200407062117
-----BEGIN PGP SIGNATURE-----
iD8DBQFA61B1vJuQZxSWSsgRAkPWAJ9tZPuCT6KPq1aVDrEv41JqfgrEzgCgp+R9
eCxGCJAJyles/9kJfz2YRJE=
=X06+
-----END PGP SIGNATURE-----