| DBD-Template documentation | view source | Contained in the DBD-Template distribution. |
DBD::TemplateSS - A template/sample class for DBI drivers with SQL::Statement.
This is still alpha version.
use DBI;
$hDb = DBI->connect("DBI:TemplateSS:", '', '',
{AutoCommit => 1, RaiseError=> 1,
tmplss_func_ => {
connect => \&connect,
prepare => \&prepare,
execute => \&execute,
fetch => \&fetch,
rows => \&rows,
name => \&name,
table_info => \&table_info,
},
tmplss_your_var => 'what you want',
)
or die "Cannot connect: " . $DBI::errstr;
$hSt = $hDb->prepare("CREATE TABLE a (id INTEGER, name CHAR(10))")
or die "Cannot prepare: " . $hDb->errstr();
...
$hDb->disconnect();
This is still alpha version.
The DBD::TemplateSS module is a DBI driver with SQL::Statement. You can make DBD with simply define function described below;
You can/should defined these functions to make DBD. required means "You should define that function". Please refer example/tmps*.pl, for more detail.
Kawai Takanori (Hippo2000) kwitknr@cpan.org
DBI, DBI::DBD, SQL::Statement
Copyright (c) 2002 KAWAI,Takanori All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
| DBD-Template documentation | view source | Contained in the DBD-Template distribution. |