From: Brandon Black Date: Fri, 19 Oct 2007 14:17:47 +0000 (+0000) Subject: Default Oracle db_schema to db username (patch from Johannes Plunien) X-Git-Tag: 0.04004~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0e184e935a0b50e9d5bcca27aa463454a0e98d5;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Default Oracle db_schema to db username (patch from Johannes Plunien) --- diff --git a/Changes b/Changes index 6196409..06ac9dd 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - Default Oracle db_schema to db username (patch + from Johannes Plunien) + 0.04003 Wed Oct 4, 2007 - Prevent users from running Kwalitee test automatically - Fix extra whitespace being added to output on diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm index dbbbfbd..1b57cba 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm @@ -32,6 +32,16 @@ This module is considered experimental and not well tested yet. =cut +sub _setup { + my $self = shift; + + $self->next::method(@_); + + my $dbh = $self->schema->storage->dbh; + $self->{db_schema} ||= $dbh->selectrow_array('SELECT USER FROM DUAL', {}); +} + + sub _table_columns { my ($self, $table) = @_;