DBD-pNET

 view release on metacpan or  search on metacpan

t/10dsnlist.t  view on Meta::CPAN

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    if ($mdriver ne '') {
        last;
    }
}
if ($mdriver eq 'pNET') {
    print "1..0\n";
    exit 0;
}
if ($verbose) { print "Driver is $mdriver\n"; }
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/20createdrop.t  view on Meta::CPAN

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
my $file;
foreach $file ("lib.pl", "t/lib.pl") {
    do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
                           exit 10;
                      }
    if ($mdriver ne '') {
        last;
    }
}
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/30insertfetch.t  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$mdriver = "";
foreach $file ("lib.pl", "t/lib.pl") {
    do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
                           exit 10;
                      }
    if ($mdriver ne '') {
        last;
    }
}
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/40bindparam.t  view on Meta::CPAN

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$mdriver = "";
foreach $file ("lib.pl", "t/lib.pl") {
    do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
                           exit 10;
                      }
    if ($mdriver ne '') {
        last;
    }
}
 
sub ServerError() {
    my $err = $DBI::errstr# Hate -w ...
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}

t/40blobs.t  view on Meta::CPAN

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
                      }
    if ($mdriver ne '') {
        last;
    }
}
if ($dbdriver eq 'mSQL'  ||  $dbdriver eq 'mSQL1') {
    print "1..0\n";
    exit 0;
}
 
sub ServerError() {
    my $err = $DBI::errstr; # Hate -w ...
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
 
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/40listfields.t  view on Meta::CPAN

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
        last;
    }
}
 
 
@table_def = (
              ["id",   "INTEGER",  4, $COL_KEY],
              ["name", "CHAR",    64, $COL_NULLABLE]
             );
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/40nulls.t  view on Meta::CPAN

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$mdriver = "";
foreach $file ("lib.pl", "t/lib.pl") {
    do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
                           exit 10;
                      }
    if ($mdriver ne '') {
        last;
    }
}
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/40numrows.t  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$mdriver = "";
foreach $file ("lib.pl", "t/lib.pl") {
    do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
                           exit 10;
                      }
    if ($mdriver ne '') {
        last;
    }
}
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/50chopblanks.t  view on Meta::CPAN

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    foreach $file ("lib.pl", "t/lib.pl") {
        do $file; if ($@) { print STDERR "Error while executing lib.pl: $@\n";
                            exit 10;
                        }
        if ($mdriver ne '') {
            last;
        }
    }
}
 
sub ServerError() {
    print STDERR ("Cannot connect: ", $DBI::errstr, "\n",
        "\tEither your server is not up and running or you have no\n",
        "\tpermissions for acessing the DSN $test_dsn.\n",
        "\tThis test requires a running server and write permissions.\n",
        "\tPlease make sure your server is running and you have\n",
        "\tpermissions, then retry.\n");
    exit 10;
}
 
#

t/Ingres.dbtest  view on Meta::CPAN

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
    }
    $def = sprintf("CREATE TABLE %s (%s%s)", $tablename,
                   join(", ", @colDefs), $keyDef);
}
 
 
#
#   This function generates a list of tables associated to a
#   given DSN.
#
sub ListTables($) {
    my($dbh, $dsn, $user, $password) = @_;
    my($ndbh, $cu, @tables);
 
    if (!ref($dbh)) { # Called by DBD::pNET, need to connect
        $dsn .= ":hostname=" . $dbh;
        if (!($ndbh = DBI->connect($dsn, $user, $password))) {
            die "Cannot connect to server at $.";
        }
        $dbh = $ndbh;
    }

t/mSQL.dbtest  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
        print "Table definition: $def\n";
    }
    $def;
}
 
 
#
#   This function generates a list of tables associated to a
#   given DSN. Highly DBMS specific, EDIT THIS!
#
sub ListTables($) {
    my($dbh) = @_;
    my(@tables);
 
    if (!defined(@tables = $dbh->func('_ListTables'))  ||  $dbh->errstr) {
        return undef;
    }
    @tables;
}

t/mysql.dbtest  view on Meta::CPAN

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
    }
    $def = sprintf("CREATE TABLE %s (%s%s)", $tablename,
                   join(", ", @colDefs), $keyDef);
}
 
 
#
#   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.356 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )