DBD-drizzle
view release on metacpan or search on metacpan
lib/DBD/drizzle.pm view on Meta::CPAN
'Attribution' => 'DBD::drizzle by Patrick Galbraith and Clint Byrum'
});
$drh;
}
sub CLONE {
undef $drh;
}
sub _OdbcParse($$$) {
my($class, $dsn, $hash, $args) = @_;
my($var, $val);
if (!defined($dsn)) {
return;
}
while (length($dsn)) {
if ($dsn =~ /([^:;]*)[:;](.*)/) {
$val = $1;
$dsn = $2;
} else {
t/40blobs.t view on Meta::CPAN
# is expected to work correctly.
#
use DBI ();
use Test::More;
use vars qw($table $test_dsn $test_user $test_password);
use lib '.', 't';
require 'lib.pl';
sub ShowBlob($) {
my ($blob) = @_;
for ($i = 0; $i < 8; $i++) {
if (defined($blob) && length($blob) > $i) {
$b = substr($blob, $i*32);
}
else {
$b = "";
}
printf("%08lx %s\n", $i*32, unpack("H64", $b));
}
t/41blobs_prepare.t view on Meta::CPAN
{ RaiseError => 1, PrintError => 1, AutoCommit => 0 });};
if ($@) {
plan skip_all => "ERROR: $DBI::errstr. Can't continue test";
}
plan tests => 25;
my @chars = grep !/[0O1Iil]/, 0..9, 'A'..'Z', 'a'..'z';
my $blob1= join '', map { $chars[rand @chars] } 0 .. 10000;
my $blob2 = '"' x 10000;
sub ShowBlob($) {
my ($blob) = @_;
my $b;
for(my $i = 0; $i < 8; $i++) {
if (defined($blob) && length($blob) > $i) {
$b = substr($blob, $i*32);
}
else {
$b = "";
}
printf("%08lx %s\n", $i*32, unpack("H64", $b));
t/50commit.t view on Meta::CPAN
{ RaiseError => 1, PrintError => 1, AutoCommit => 0 });};
if ($@) {
plan skip_all =>
"ERROR: $DBI::errstr. Can't continue test";
}
sub catch_warning ($) {
$got_warning = 1;
}
sub num_rows($$$) {
my($dbh, $table, $num) = @_;
my($sth, $got);
if (!($sth = $dbh->prepare("SELECT * FROM $table"))) {
return "Failed to prepare: err " . $dbh->err . ", errstr "
. $dbh->errstr;
}
if (!$sth->execute) {
return "Failed to execute: err " . $dbh->err . ", errstr "
. $dbh->errstr;
t/drizzle.dbtest view on Meta::CPAN
#
# database specific definitions for a 'drizzle' database
my $have_transactions;
#
# This function generates a list of tables associated to a
# given DSN.
#
sub ListTables(@) {
my($dbh) = shift;
my(@tables);
@tables = $dbh->func('_ListTables');
if ($dbh->errstr) {
die "Cannot create table list: " . $dbh->errstr;
}
@tables;
}
( run in 0.274 second using v1.01-cache-2.11-cpan-1f129e94a17 )