use strict;
use warnings;
-use base 'DBIx::Class::Schema::Loader::DBI';
+use base qw/
+ DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault
+ DBIx::Class::Schema::Loader::DBI
+/;
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04999_11';
+our $VERSION = '0.05003';
=head1 NAME
$self->next::method(@_);
my $dbh = $self->schema->storage->dbh;
- $self->{db_schema} ||= $dbh->selectrow_array('SELECT USER FROM DUAL', {});
-}
+ my ($current_schema) = $dbh->selectrow_array('SELECT USER FROM DUAL', {});
-sub _table_columns {
- my ($self, $table) = @_;
+ $self->{db_schema} ||= $current_schema;
- my $dbh = $self->schema->storage->dbh;
+ if (lc($self->db_schema) ne lc($current_schema)) {
+ $dbh->do('ALTER SESSION SET current_schema=' . $self->db_schema);
+ }
+}
+
+sub _table_as_sql {
+ my ($self, $table) = @_;
- my $sth = $dbh->prepare($self->schema->storage->sql_maker->select($table, undef, \'1 = 0'));
- $sth->execute;
- return \@{$sth->{NAME_lc}};
+ return $self->_quote_table_name($table);
}
sub _tables_list {
push @tables, $1
if $table =~ /\A(\w+)\z/;
}
- return @tables;
+ return $self->_filter_tables(@tables);
}
sub _table_uniq_info {
=head1 AUTHOR
-See L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
=head1 LICENSE