Subject: | [patch] Oracle: work around DBD::Oracle's failure to SELECT an XMLTYPE column |
DBD::Oracle is unable to SELECT a column of type XMLTYPE, therefore a
discovery attempt on a schema with such a column will fail; see
https://rt.cpan.org/Ticket/Display.html?id=42280
Attached a patch to use DBI->column_info() instead of "SELECT *".
Subject: | perl-DBIx-Class-Schema-Loader-ora_xmltype.patch |
--- DBIx-Class-Schema-Loader-0.04003/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 2007-10-04 15:09:52.000000000 +0200
+++ DBIx-Class-Schema-Loader-0.04003/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 2009-01-10 15:00:48.612905271 +0100
@@ -37,9 +37,8 @@
my $dbh = $self->schema->storage->dbh;
- my $sth = $dbh->prepare($self->schema->storage->sql_maker->select($table, undef, \'1 = 0'));
- $sth->execute;
- return \@{$sth->{NAME_lc}};
+ my $sth = $dbh->column_info(undef, $self->db_schema, $table, 'TABLE,VIEW');
+ return [ map lc, keys %{ $sth->fetchall_hashref('COLUMN_NAME') } ];
}
sub _tables_list {