[Bast-commits] r6561 - in branches/DBIx-Class-Schema-Loader/current: . lib/DBIx/Class/Schema/Loader lib/DBIx/Class/Schema/Loader/DBI lib/DBIx/Class/Schema/Loader/DBI/ODBC

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Tue Jun 9 13:25:06 GMT 2009


Author: caelum
Date: 2009-06-09 13:25:06 +0000 (Tue, 09 Jun 2009)
New Revision: 6561

Modified:
   branches/DBIx-Class-Schema-Loader/current/
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
Log:
 r4528 at hlagh (orig r6423):  caelum | 2009-05-25 11:36:19 -0700
 cleaned up ODBC crap and added docs



Property changes on: branches/DBIx-Class-Schema-Loader/current
___________________________________________________________________
Name: svk:merge
   - 46bc3436-8211-0410-8564-d96f7a728040:/local/DBIx-Class-Schema-Loader/branches/common-dump:37173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-Schema-Loader/odbc-mssql:6409
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class-Schema-Loader:5726
   + 46bc3436-8211-0410-8564-d96f7a728040:/local/DBIx-Class-Schema-Loader/branches/common-dump:37173
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/branches/DBIx-Class-Schema-Loader/odbc-mssql:6423
bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class-Schema-Loader:5726

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm	2009-06-09 13:24:40 UTC (rev 6560)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm	2009-06-09 13:25:06 UTC (rev 6561)
@@ -1,16 +1,42 @@
 package DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server;
 
+use strict;
+use warnings;
 use base 'DBIx::Class::Schema::Loader::DBI::MSSQL';
+use Carp::Clan qw/^DBIx::Class/;
+use Class::C3;
 
+our $VERSION = '0.04999_06';
+
+=head1 NAME
+
+DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server - ODBC wrapper for
+L<DBIx::Class::Schema::Loader::DBI::MSSQL>
+
+=head1 DESCRIPTION
+
+Proxy for L<DBIx::Class::Schema::Loader::DBI::MSSQL> when using L<DBD::ODBC>.
+
+See L<DBIx::Class::Schema::Loader::Base> for usage information.
+
+=cut
+
 sub _tables_list { 
     my $self = shift;
 
-    my $dbh = $self->schema->storage->dbh;
-    my @tables = $dbh->tables(undef, $self->db_schema);
-    s/\Q$self->{_quoter}\E//g for @tables;
-    s/^.*\Q$self->{_namesep}\E// for @tables;
-
-    return @tables;
+    return $self->next::method(undef, undef);
 }
 
+=head1 SEE ALSO
+
+L<DBIx::Class::Schema::Loader::DBI::MSSQL>,
+L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
+L<DBIx::Class::Schema::Loader::DBI>
+
+=head1 AUTHOR
+
+Rafael Kitover C<rkitover at cpan.org>
+
+=cut
+
 1;

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm	2009-06-09 13:24:40 UTC (rev 6560)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm	2009-06-09 13:25:06 UTC (rev 6561)
@@ -8,11 +8,28 @@
 
 our $VERSION = '0.04999_06';
 
+=head1 NAME
+
+DBIx::Class::Schema::Loader::DBI::ODBC - L<DBD::ODBC> proxy, currently only for
+Microsoft SQL Server
+
+=head1 DESCRIPTION
+
+Reblesses into L<DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server>,
+which is a proxy for L<DBIx::Class::Schema::Loader::DBI::MSSQL> when using the
+L<DBD::ODBC> driver with Microsoft SQL Server.
+
+Code stolen from the L<DBIx::Class> ODBC storage.
+
+See L<DBIx::Class::Schema::Loader::Base> for usage information.
+
+=cut
+
 sub _rebless {
   my $self = shift;
   my $dbh  = $self->schema->storage->dbh;
 
-# stolen from DBIC ODBC driver for MSSQL
+# stolen from DBIC ODBC storage
   my $dbtype = eval { $dbh->get_info(17) };
   unless ( $@ ) {
     # Translate the backend name into a perl identifier
@@ -23,4 +40,17 @@
   }
 }
 
+=head1 SEE ALSO
+
+L<DBIx::Class::Schema::Loader::DBI::ODBC::Microsoft_SQL_Server>,
+L<DBIx::Class::Schema::Loader::DBI::MSSQL>,
+L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
+L<DBIx::Class::Schema::Loader::DBI>
+
+=head1 AUTHOR
+
+Rafael Kitover C<rkitover at cpan.org>
+
+=cut
+
 1;

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm	2009-06-09 13:24:40 UTC (rev 6560)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm	2009-06-09 13:25:06 UTC (rev 6561)
@@ -75,8 +75,10 @@
 sub _tables_list { 
     my $self = shift;
 
+    my ($table, $type) = @_ ? @_ : ('%', '%');
+
     my $dbh = $self->schema->storage->dbh;
-    my @tables = $dbh->tables(undef, $self->db_schema, '%', '%');
+    my @tables = $dbh->tables(undef, $self->db_schema, $table, $type);
     s/\Q$self->{_quoter}\E//g for @tables;
     s/^.*\Q$self->{_namesep}\E// for @tables;
 




More information about the Bast-commits mailing list