Subject: | Patch for basic get_info support |
This patch will permit the correct values to be retrieved for $dbh->get_info(17) and $dbh->get_info(18) i.e. database name and version.
diff -ru DBD-SQLite-0.29/lib/DBD/SQLite.pm new/lib/DBD/SQLite.pm
--- DBD-SQLite-0.29/lib/DBD/SQLite.pm 2003-12-06 02:12:48.000000000 +1100
+++ new/lib/DBD/SQLite.pm 2004-02-26 15:01:13.000000000 +1100
@@ -76,6 +76,22 @@
return $sth;
}
+sub _get_version {
+ my ($dbh) = @_;
+ return (DBD::SQLite::db::FETCH($dbh, 'sqlite_version'));
+}
+
+our (%info) = (
+ 17 => 'SQLite',
+ 18 => \&_get_version,
+);
+
+sub get_info {
+ my($dbh, $info_type) = @_;
+ my $v = $info{int($info_type)};
+ $v = $v->($dbh) if ref $v eq 'CODE';
+ return $v;
+}
sub table_info {
my ($dbh, $CatVal, $SchVal, $TblVal, $TypVal) = @_;
Only in new: temp.db