1DBD::Sponge(3)        User Contributed Perl Documentation       DBD::Sponge(3)
2
3
4

NAME

6       DBD::Sponge - Create a DBI statement handle from Perl data
7

SYNOPSIS

9         my $sponge = DBI->connect("dbi:Sponge:","","",{ RaiseError => 1 });
10         my $sth = $sponge->prepare($statement, {
11                 rows => $data,
12                 NAME => $names,
13                 %attr
14             }
15         );
16

DESCRIPTION

18       DBD::Sponge is useful for making a Perl data structure accessible
19       through a standard DBI statement handle. This may be useful to DBD
20       module authors who need to transform data in this way.
21

METHODS

23   connect()
24         my $sponge = DBI->connect("dbi:Sponge:","","",{ RaiseError => 1 });
25
26       Here's a sample syntax for creating a database handle for the Sponge
27       driver.  No username and password are needed.
28
29   prepare()
30         my $sth = $sponge->prepare($statement, {
31                 rows => $data,
32                 NAME => $names,
33                 %attr
34             }
35         );
36
37       ·   The $statement here is an arbitrary statement or name you want to
38           provide as identity of your data. If you're using DBI::Profile it
39           will appear in the profile data.
40
41           Generally it's expected that you are preparing a statement handle
42           as if a "select" statement happened.
43
44       ·   $data is a reference to the data you are providing, given as an
45           array of arrays.
46
47       ·   $names is a reference an array of column names for the $data you
48           are providing.  The number and order should match the number and
49           ordering of the $data columns.
50
51       ·   %attr is a hash of other standard DBI attributes that you might
52           pass to a prepare statement.
53
54           Currently only NAME, TYPE, and PRECISION are supported.
55

BUGS

57       Using this module to prepare INSERT-like statements is not currently
58       documented.
59
61       This module is Copyright (c) 2003 Tim Bunce
62
63       Documentation initially written by Mark Stosberg
64
65       The DBD::Sponge module is free software; you can redistribute it and/or
66       modify it under the same terms as Perl itself. In particular permission
67       is granted to Tim Bunce for distributing this as a part of the DBI.
68

SEE ALSO

70       DBI
71
72
73
74perl v5.28.0                      2015-05-26                    DBD::Sponge(3)
Impressum