dev release
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / MSSQL.pm
index fef1f2e..2bec915 100644 (file)
@@ -2,11 +2,14 @@ package DBIx::Class::Schema::Loader::DBI::MSSQL;
 
 use strict;
 use warnings;
-use base 'DBIx::Class::Schema::Loader::DBI';
+use base qw/
+    DBIx::Class::Schema::Loader::DBI
+    DBIx::Class::Schema::Loader::DBI::Sybase::Common
+/;
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.04999_06';
+our $VERSION = '0.04999_08';
 
 =head1 NAME
 
@@ -27,28 +30,14 @@ See L<DBIx::Class::Schema::Loader::Base>.
 
 =cut
 
-sub _rebless {
-    my $self = shift;
-
-    $self->schema->storage->sql_maker->quote_char([qw/[ ]/])
-        unless $self->schema->storage->sql_maker->quote_char;
-
-    $self->schema->storage->sql_maker->name_sep('.')
-        unless $self->schema->storage->sql_maker->name_sep;
-}
-
 sub _setup {
     my $self = shift;
 
     $self->next::method(@_);
-    $self->{db_schema} ||= 'dbo';
+    $self->{db_schema} ||= $self->_build_db_schema;
+    $self->_set_quote_char_and_name_sep;
 }
 
-# DBD::Sybase doesn't implement get_info properly
-#sub _build_quoter  { [qw/[ ]/] }
-sub _build_quoter  { '"' }
-sub _build_namesep { '.' }
-
 sub _table_pk_info {
     my ($self, $table) = @_;
     my $dbh = $self->schema->storage->dbh;
@@ -140,6 +129,10 @@ L<DBIx::Class::Schema::Loader::DBI>
 
 Justin Hunter C<justin.d.hunter@gmail.com>
 
+=head1 CONTRIBUTORS
+
+Rafael Kitover <rkitover@cpan.org>
+
 =cut
 
 1;