{
    "mode": "perldoc",
    "parameter": "DBD::Sponge",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3ASponge/json",
    "generated": "2026-06-16T10:34:27Z",
    "synopsis": "my $sponge = DBI->connect(\"dbi:Sponge:\",\"\",\"\",{ RaiseError => 1 });\nmy $sth = $sponge->prepare($statement, {\nrows => $data,\nNAME => $names,\n%attr\n}\n);",
    "sections": {
        "NAME": {
            "content": "DBD::Sponge - Create a DBI statement handle from Perl data\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $sponge = DBI->connect(\"dbi:Sponge:\",\"\",\"\",{ RaiseError => 1 });\nmy $sth = $sponge->prepare($statement, {\nrows => $data,\nNAME => $names,\n%attr\n}\n);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "DBD::Sponge is useful for making a Perl data structure accessible through a standard DBI\nstatement handle. This may be useful to DBD module authors who need to transform data in this\nway.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "connect()\nmy $sponge = DBI->connect(\"dbi:Sponge:\",\"\",\"\",{ RaiseError => 1 });\n\nHere's a sample syntax for creating a database handle for the Sponge driver. No username and\npassword are needed.\n\nprepare()\nmy $sth = $sponge->prepare($statement, {\nrows => $data,\nNAME => $names,\n%attr\n}\n);\n\n*   The $statement here is an arbitrary statement or name you want to provide as identity of\nyour data. If you're using DBI::Profile it will appear in the profile data.\n\nGenerally it's expected that you are preparing a statement handle as if a \"select\" statement\nhappened.\n\n*   $data is a reference to the data you are providing, given as an array of arrays.\n\n*   $names is a reference an array of column names for the $data you are providing. The number\nand order should match the number and ordering of the $data columns.\n\n*   %attr is a hash of other standard DBI attributes that you might pass to a prepare statement.\n\nCurrently only NAME, TYPE, and PRECISION are supported.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Using this module to prepare INSERT-like statements is not currently documented.\n",
            "subsections": []
        },
        "AUTHOR AND COPYRIGHT": {
            "content": "This module is Copyright (c) 2003 Tim Bunce\n\nDocumentation initially written by Mark Stosberg\n\nThe DBD::Sponge module is free software; you can redistribute it and/or modify it under the same\nterms as Perl itself. In particular permission is granted to Tim Bunce for distributing this as\na part of the DBI.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "DBI\n",
            "subsections": []
        }
    },
    "summary": "DBD::Sponge - Create a DBI statement handle from Perl data",
    "flags": [],
    "examples": [],
    "see_also": []
}