File: 04select.t

package info (click to toggle)
libdbd-sqlite2-perl 2%3A0.38-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,692 kB
  • sloc: ansic: 27,895; perl: 1,730; makefile: 12
file content (17 lines) | stat: -rw-r--r-- 371 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Test;
BEGIN { plan tests => 7 }
use DBI;
my $dbh = DBI->connect("dbi:SQLite2:dbname=foo", "", "", { RaiseError => 1 });
ok($dbh);
my $sth = $dbh->prepare("SELECT * FROM f");
ok($sth);
ok($sth->execute);
my $row = $sth->fetch;
ok($row);
ok(@$row, 3);
print join(", ", @$row), "\n";
my $rows = $sth->execute;
ok($rows);
ok($sth->fetch);
$sth->finish;
$dbh->disconnect;