DBD::Sponge is useful for making a Perl data structure accessible through a
standard DBI statement handle. This may be useful to DBD module authors who
need to transform data in this way.
my $sth = $sponge->prepare($statement, {
rows => $data,
NAME => $names,
%attr
}
);
The $statement here is an arbitrary statement or name you want
to provide as identity of your data. If you're using DBI::Profile it will appear in the profile data.
Generally it's expected that you are preparing a statement handle
as if a select statement happened.
$data is a reference to the data you are providing, given as an array of arrays.
$names is a reference an array of column names for the $data you are providing.
The number and order should match the number and ordering of the $data columns.
%attr is a hash of other standard DBIattributes that you might pass to a prepare statement.
Currently only NAME, TYPE, and PRECISION are supported.
The DBD::Sponge module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. In particular permission
is granted to Tim Bunce for distributing this as a part of the DBI.