Revision history for Perl extension DBIx::DBSchema.
+0.26 Thu Apr 7 01:09:53 PDT 2005
+ - ask for "public" db schema only from Pg
+
0.25 Wed Apr 6 16:12:38 PDT 2005
- depend on DBD::Pg 1.32 or 1.41+ (1.40 was bunk)
#@ISA = qw(Exporter);
@ISA = ();
-$VERSION = "0.25";
+$VERSION = "0.26";
=head1 NAME
sub _tables_from_dbh {
my($dbh) = @_;
- my $sth = $dbh->table_info or die $dbh->errstr;
+ my $driver = _load_driver($dbh);
+ my $db_catalog =
+ scalar(eval "DBIx::DBSchema::DBD::$driver->default_db_catalog");
+ my $db_schema =
+ scalar(eval "DBIx::DBSchema::DBD::$driver->default_db_schema");
+ my $sth = $dbh->table_info($db_catalog, $db_schema, '', 'TABLE')
+ or die $dbh->errstr;
#map { $_->{TABLE_NAME} } grep { $_->{TABLE_TYPE} eq 'TABLE' }
# @{ $sth->fetchall_arrayref({ TABLE_NAME=>1, TABLE_TYPE=>1}) };
map { $_->[0] } grep { $_->[1] =~ /^TABLE$/i }
use strict;
use vars qw($VERSION);
-$VERSION = '0.02';
+$VERSION = '0.03';
=head1 NAME
point a list of column names for each. See L<perldsc/"HASHES OF LISTS"> and
L<DBIx::DBSchema::ColGroup>.
+=item default_db_catalog
+
+Returns the default database catalog for the DBI table_info command.
+Inheriting from DBIx::DBSchema::DBD will provide the default empty string.
+
+=cut
+
+sub default_db_catalog { ''; }
+
+=item default_db_catalog
+
+Returns the default database schema for the DBI table_info command.
+Inheriting from DBIx::DBSchema::DBD will provide the default empty string.
+
+=cut
+
+sub default_db_schema { ''; }
+
=back
=head1 TYPE MAPPING
=head1 COPYRIGHT
-Copyright (c) 2000 Ivan Kohler
-Copyright (c) 2000 Mail Abuse Prevention System LLC
+Copyright (c) 2000-2005 Ivan Kohler
All rights reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
if $DBD::Pg::VERSION != 1.32 && $DBD::Pg::VERSION < 1.41;
use DBIx::DBSchema::DBD;
-$VERSION = '0.09';
+$VERSION = '0.10';
@ISA = qw(DBIx::DBSchema::DBD);
%typemap = (
=cut
+sub default_db_schema { 'public'; }
+
sub columns {
my($proto, $dbh, $table) = @_;
my $sth = $dbh->prepare(<<END) or die $dbh->errstr;