[Bast-commits] r3165 - in branches/DBIx-Class-Schema-Loader/oracle:
. lib/DBIx/Class/Schema/Loader/DBI t
blblack at dev.catalyst.perl.org
blblack at dev.catalyst.perl.org
Fri Mar 30 23:29:25 GMT 2007
Author: blblack
Date: 2007-03-30 23:29:24 +0100 (Fri, 30 Mar 2007)
New Revision: 3165
Added:
branches/DBIx-Class-Schema-Loader/oracle/t/14ora_common.t
Modified:
branches/DBIx-Class-Schema-Loader/oracle/Build.PL
branches/DBIx-Class-Schema-Loader/oracle/Changes
branches/DBIx-Class-Schema-Loader/oracle/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
Log:
tweak up the oracle support, needs some testing
Modified: branches/DBIx-Class-Schema-Loader/oracle/Build.PL
===================================================================
--- branches/DBIx-Class-Schema-Loader/oracle/Build.PL 2007-03-30 22:25:52 UTC (rev 3164)
+++ branches/DBIx-Class-Schema-Loader/oracle/Build.PL 2007-03-30 22:29:24 UTC (rev 3165)
@@ -25,7 +25,7 @@
'DBD::mysql' => 3.0003,
'DBD::Pg' => 1.49,
'DBD::DB2' => 0.78,
- 'DBD::Oracle' => 0.18,
+ 'DBD::Oracle' => 0.19,
},
build_requires => {
'Test::More' => 0.32,
Modified: branches/DBIx-Class-Schema-Loader/oracle/Changes
===================================================================
--- branches/DBIx-Class-Schema-Loader/oracle/Changes 2007-03-30 22:25:52 UTC (rev 3164)
+++ branches/DBIx-Class-Schema-Loader/oracle/Changes 2007-03-30 22:29:24 UTC (rev 3165)
@@ -1,5 +1,7 @@
Revision history for Perl extension DBIx::Class::Schema::Loader
+ - Added *experimental* Oracle support from work done
+ by Tsunoda Kazuya some months ago. Not well tested.
- Added "rescan" schema (and loader) method, which picks
up newly created tables at runtime
- Made dump_to_dir / dump_overwrite much more intelligent
Modified: branches/DBIx-Class-Schema-Loader/oracle/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/oracle/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 2007-03-30 22:25:52 UTC (rev 3164)
+++ branches/DBIx-Class-Schema-Loader/oracle/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 2007-03-30 22:29:24 UTC (rev 3165)
@@ -6,6 +6,8 @@
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
+our $VERSION = '0.03999_01';
+
=head1 NAME
DBIx::Class::Schema::Loader::DBI::Oracle - DBIx::Class::Schema::Loader::DBI
@@ -16,9 +18,7 @@
package My::Schema;
use base qw/DBIx::Class::Schema::Loader/;
- __PACKAGE__->loader_options(
- relationships => 1,
- );
+ __PACKAGE__->loader_options( debug => 1 );
1;
@@ -26,6 +26,8 @@
See L<DBIx::Class::Schema::Loader::Base>.
+This module is considered experimental and not well tested yet.
+
=cut
sub _table_columns {
@@ -33,7 +35,7 @@
my $dbh = $self->schema->storage->dbh;
- my $sth = $dbh->prepare("SELECT * FROM $table WHERE 1=0");
+ my $sth = $dbh->prepare($self->schema->storage->sql_maker->select($table, undef, \'1 = 0'));
$sth->execute;
return \@{$sth->{NAME_lc}};
}
Added: branches/DBIx-Class-Schema-Loader/oracle/t/14ora_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/oracle/t/14ora_common.t (rev 0)
+++ branches/DBIx-Class-Schema-Loader/oracle/t/14ora_common.t 2007-03-30 22:29:24 UTC (rev 3165)
@@ -0,0 +1,22 @@
+use strict;
+use lib qw(t/lib);
+use dbixcsl_common_tests;
+
+my $dsn = $ENV{DBICTEST_ORA_DSN} || '';
+my $user = $ENV{DBICTEST_ORA_USER} || '';
+my $password = $ENV{DBICTEST_ORA_PASS} || '';
+
+my $tester = dbixcsl_common_tests->new(
+ vendor => 'Oracle',
+ auto_inc_pk => 'SERIAL NOT NULL PRIMARY KEY',
+ dsn => $dsn,
+ user => $user,
+ password => $password,
+);
+
+if( !$dsn || !$user ) {
+ $tester->skip_tests('You need to set the DBICTEST_ORA_DSN, _USER, and _PASS environment variables');
+}
+else {
+ $tester->run_tests();
+}
More information about the Bast-commits
mailing list