File: 02cr_table.t

package info (click to toggle)
libdbd-sqlite2-perl 2%3A0.33-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,632 kB
  • ctags: 2,313
  • sloc: ansic: 27,879; perl: 1,705; makefile: 52
file content (16 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use Test;
BEGIN { plan tests => 4 }
use DBI;
my $dbh = DBI->connect("dbi:SQLite2:dbname=foo", "", "");
ok($dbh);
$dbh->{AutoCommit} = 1;
$dbh->do("CREATE TABLE f (f1, f2, f3)");
my $sth = $dbh->prepare("SELECT f.f1, f.* FROM f");
ok($sth->execute());
my $names = $sth->{NAME};
ok(@$names == 4);
print(join(', ', @$names), "\n");
ok($names->[0] eq "f1");	# make sure the "f." is removed
$sth->finish;
$dbh->disconnect;